[Numpy-discussion] Why NaN?

Bruce Southey bsouthey at gmail.com
Tue Aug 4 16:53:00 EDT 2009


On Tue, Aug 4, 2009 at 1:40 PM, Gökhan Sever<gokhansever at gmail.com> wrote:
> This is the loveliest of all solutions:
>
> c[isfinite(c)].mean()

This handling of nonfinite elements has come up before.
Please remember that this only for 1d or flatten array so it not work
in general especially along an axis.


Bruce



More information about the NumPy-Discussion mailing list