[Numpy-discussion] Understanding np.min behaviour with nan

Andrew Nelson andyfaff at gmail.com
Wed Jan 10 18:03:25 EST 2018


Further to my last message, why is the warning only raised once?

```
>>> import numpy as np
>>> np.min([1, np.nan])
/Users/andrew/miniconda3/envs/dev3/lib/python3.6/site-packages/numpy/core/_methods.py:29:
RuntimeWarning: invalid value encountered in reduce
  return umr_minimum(a, axis, None, out, keepdims)
nan
>>> np.min([1, np.nan])
nan
>>>
```
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180111/fde63322/attachment.html>


More information about the NumPy-Discussion mailing list