[Numpy-discussion] 0/0 == 0?
T J
tjhnson at gmail.com
Thu Oct 2 19:02:32 EDT 2014
Hi, I'm using NumPy 1.8.2:
In [1]: np.array(0) / np.array(0)
Out[1]: 0
In [2]: np.array(0) / np.array(0.0)
Out[2]: nan
In [3]: np.array(0.0) / np.array(0)
Out[3]: nan
In [4]: np.array(0.0) / np.array(0.0)
Out[4]: nan
In [5]: 0/0
---------------------------------------------------------------------------
ZeroDivisionError Traceback (most recent call last)
<ipython-input-6-6549dea6d1ae> in <module>()
----> 1 0/0
ZeroDivisionError: integer division or modulo by zero
Out[1] seems odd. I get the right value in 1.8.1. Was this fixed for 1.9.0?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20141002/cde9332f/attachment.html>
More information about the NumPy-Discussion
mailing list