[Numpy-discussion] (no subject)

Benjamin Root ben.root at ou.edu
Thu Sep 18 12:48:30 EDT 2014


My vote is that NumPy is correct here. I see no reason why
>>> float('inf') / 1
and
>>> float('inf') // 1

should return different results.

Ben Root


On Thu, Sep 18, 2014 at 12:31 PM, Petr Viktorin <encukou at gmail.com> wrote:

> Hello,
> Over at Python-ideas, there is a thread [0] about the following
> discrepancy:
>
> >>> numpy.array(float('inf')) // 1
> inf
> >>> float('inf') // 1
> nan
>
> There are reasons for either result, but I believe it would be very
> nice if either Python or Numpy changed, so they would give the same
> value.
> If any of you have reasons to defend Numpy's (or Python's) choice, or
> otherwise want to chime in, please post there.
>
> Thanks,
> Petr Viktorin
>
>
> [0]
> https://mail.python.org/pipermail/python-ideas/2014-September/029365.html
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140918/24b6f709/attachment.html>


More information about the NumPy-Discussion mailing list