[SciPy-user] nan?

Joshua Petterson joshuafr at gmail.com
Wed Nov 29 17:18:15 CST 2006

my question is maybe trivial, but what is the utility of numpy.NAN?
In [60]: nan==nan
Out[60]: False

In [61]: a=ma.masked_object((1,2,nan),nan)

In [62]: a
Out[62]: array([ 1.          2.                 nan])

In [63]: b=array([(1,2,3),(4,5,nan)])

In [64]: b.max()
Out[64]: 5.0

In [65]: b.mean()
Out[65]: nan

More information about the SciPy-user mailing list