[Numpy-discussion] 0/0 == 0?

Charles R Harris charlesr.harris at gmail.com
Thu Oct 2 22:20:41 EDT 2014

On Thu, Oct 2, 2014 at 7:06 PM, Benjamin Root <ben.root at ou.edu> wrote:

> Out[1] has an integer divided by an integer, and you can't represent nan
> as an integer. Perhaps something weird was happening with type promotion
> between versions?

Also note that in python3 the '/' operator does float rather than integer

>>> np.array(0) / np.array(0)
__main__:1: RuntimeWarning: invalid value encountered in true_divide


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20141002/af578e56/attachment.html>

More information about the NumPy-Discussion mailing list