[Numpy-discussion] bug in round with negative number of decimals

Paulo J. S. Silva pjssilva at ime.usp.br
Mon Sep 4 15:41:16 EDT 2006


Ops,

I believe you were caught by int versus float here:

In [16]:around(66.0, decimals=-1)
Out[16]:70.0

In [17]:around(66, decimals=-1)
Out[17]:60

Note that in the int case, it seems like round is simply truncation.

Paulo





More information about the NumPy-Discussion mailing list