We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef51288 commit b4b54f0Copy full SHA for b4b54f0
src/future/builtins/newround.py
@@ -32,10 +32,10 @@ def newround(number, ndigits=None):
32
33
exponent = Decimal('10') ** (-ndigits)
34
35
- if PYPY:
36
- # Work around issue #24: round() breaks on PyPy with NumPy's types
37
- if 'numpy' in repr(type(number)):
38
- number = float(number)
+ # Work around issue #24: round() breaks on PyPy with NumPy's types
+ # Also breaks on CPython with NumPy's specialized int types like uint64
+ if 'numpy' in repr(type(number)):
+ number = float(number)
39
40
if isinstance(number, Decimal):
41
d = number
0 commit comments