[Numpy-discussion] average of array containing NaN

Charles R Harris charlesr.harris at gmail.com
Mon Jun 25 15:42:13 EDT 2007

On 6/25/07, Giorgio F. Gilestro <giorgio at gilestro.tk> wrote:
> Masked array seems definitely to be the way to go, thanks a lot.
> I must say that this entire issue doesn't make much sense to me: my
> understanding is the a NaN is different from an INF, therefore one
> would assume that really there is no reason why a not-number should
> not be ignored by default by all the array manipulating functions.

Strictly speaking, it should be propagated, i.e., the sum and average should
be NaNs also. I don't know why that didn't happen.

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

More information about the NumPy-Discussion mailing list