[Numpy-discussion] Nansum function behavior

Stephan Hoyer shoyer at gmail.com
Fri Oct 23 21:28:27 EDT 2015


Hi Charles,

You should read the previous discussion about this issue on GitHub:
https://github.com/numpy/numpy/issues/1721

For what it's worth, I do think the new definition of nansum is more
consistent.

If you want to preserve NaN if there are no non-NaN values, you can often
calculate this desired quantity from nanmean, which does return NaN if
there are only NaNs.

Stephan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20151023/0eac711e/attachment.html>


More information about the NumPy-Discussion mailing list