[Python-ideas] Fwd: Make `float('inf') //1 == float('inf')`

Alexander Belopolsky alexander.belopolsky at gmail.com
Thu Sep 18 19:04:50 CEST 2014


On Thu, Sep 18, 2014 at 12:17 PM, Steven D'Aprano <steve at pearwood.info>
wrote:

> > What I do care about is that Python and Numpy should give the same
> > result. It would be nice to see this changed in either Python or
> > Numpy, whatever the "correct" result is.
>
> That is reasonable.


Consistency with NumPy cannot aways be achieved.  Note that numpy.floor
returns floats while math.floor returns ints.  (NumPy cannot follow stdlib
here because it does not have arbitrary precision integers.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140918/e848706e/attachment.html>


More information about the Python-ideas mailing list