[Numpy-discussion] Why NaN?

Bruce Southey bsouthey@gmail....
Tue Aug 4 15:53:00 CDT 2009


On Tue, Aug 4, 2009 at 1:40 PM, Gökhan Sever<gokhansever@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