[Numpy-discussion] Medians that ignore values

Alan G Isaac aisaac at american.edu
Fri Sep 19 12:22:05 EDT 2008


On 9/19/2008 11:46 AM Pierre GM apparently wrote:
> You can't compare NaNs to anything. How do you know this np.miss is a masked 
> value, when np.sqrt(-1.) is NaN ?

I thought you could use ``is``.
E.g.,
 >>> np.nan == np.nan
False
 >>> np.nan is np.nan
True

Alan




More information about the NumPy-Discussion mailing list