<div dir="ltr"><div><div>My vote is that NumPy is correct here. I see no reason why<br></div><div>>>> float('inf') / 1<br></div><div>and<br></div><div>>>> float('inf') // 1<br><br></div><div>should return different results.<br><br></div><div>Ben Root<br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 18, 2014 at 12:31 PM, Petr Viktorin <span dir="ltr"><<a href="mailto:encukou@gmail.com" target="_blank">encukou@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
Over at Python-ideas, there is a thread [0] about the following discrepancy:<br>
<br>
>>> numpy.array(float('inf')) // 1<br>
inf<br>
>>> float('inf') // 1<br>
nan<br>
<br>
There are reasons for either result, but I believe it would be very<br>
nice if either Python or Numpy changed, so they would give the same<br>
value.<br>
If any of you have reasons to defend Numpy's (or Python's) choice, or<br>
otherwise want to chime in, please post there.<br>
<br>
Thanks,<br>
Petr Viktorin<br>
<br>
<br>
[0] <a href="https://mail.python.org/pipermail/python-ideas/2014-September/029365.html" target="_blank">https://mail.python.org/pipermail/python-ideas/2014-September/029365.html</a><br>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div><br></div>