[Numpy-discussion] numpy.float64(numpy.NaN)!=numpy.NaN

Simon Burton simon at arrowtheory.com
Mon May 15 06:57:28 EDT 2006


On Mon, 15 May 2006 09:21:59 -0400
Sasha <ndarray at mac.com> wrote:

> 
> BTW,
> 
> >>> from numpy import *
> >>> nan == nan
> False
> 
> >>> from decimal import *
> >>> Decimal('NaN') == Decimal('NaN')
> False
> 
> and finally (may not work on all platforms):
> 
> >>> float('NaN') == float('NaN')
> False

Yes. It looks like the "isnan" function is what I need.

I use NaN for missing data points, and I do masking
on NaN, etc. Quite handy really.

Simon.

-- 
Simon Burton, B.Sc.
Licensed PO Box 8066
ANU Canberra 2601
Australia
Ph. 61 02 6249 6940
http://arrowtheory.com 




More information about the NumPy-Discussion mailing list