I'm having some trouble understanding the behaviour of np.min when used
with NaN. In the documentation of np.amin it says: "NaN values are
propagated, that is if at least one item is NaN, the corresponding min
value will be NaN as well. ". It doesn't say that in some circumstances
there will be Run
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,
On Wed, Jan 10, 2018 at 3:03 PM, Andrew Nelson wrote:
>
> 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
On 10 January 2018 at 23:03, Andrew Nelson wrote:
> Further to my last message, why is the warning only raised once?
Warnings are only raised once because that is the default behaviour
for warnings. The warning is issued every time but only displayed on
the first occurence.
You can control this
> The same warning would have been issued from the same place in each of
the variations you tried.
That's not the case, I tried with np.min([1, 2, 3, np.nan]) in a fresh
interpreter and no warning was raised.
Furthermore on my work computer (conda python3.6.2 with pip installed
numpy) I can't get