[Numpy-discussion] why numpy.round get a different result from python round function?

shuwj5460@16... shuwj5460@16...
Tue Mar 10 00:26:51 CDT 2009


hi,

I read the doc for numpy about round function:

-----
For values exactly halfway between rounded decimal values, Numpy rounds
to the nearest even value. Thus 1.5 and 2.5 round to 2.0, -0.5 and 0.5
round to 0.0, etc. Results may also be surprising due to the inexact
representation of decimal fractions in the IEEE floating point standard
[16] and errors introduced when scaling by powers of ten.
----

why not numpy round  keep the same with python round function? or
provide anothor function to do so?

               david.shu
               2009.3.10

-- 
 <>




More information about the Numpy-discussion mailing list