Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Rounding integers with custom decimals throws NotImplementedError #613

@William04A

Description

@William04A

Hi! I've noticed a bug related to the rounding function.

Heads up: I'm quite confident that this is the same bug as described here: adafruit/circuitpython#1890.

Board/system information:

(sysname='GPy', nodename='GPy', release='1.20.2.r6', version='v1.11-c5a0a97 on 2021-10-28', machine='GPy with ESP32', pybytes='1.7.1')

Bug report

Rounding integer values with a custom number of decimals seems to throw a NotImplementedError:

>>> round(1, 2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NotImplementedError:

If the values is converted to float, it works fine:

>>> round(float(1), 2)
1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions