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

Albert Strasheim fullung at gmail.com
Mon May 15 01:11:40 EDT 2006


Hey Simon

I think this is a feature. NaN is never equal to anything else, including
itself. MATLAB does the same thing:

>> nan==nan
ans =
     0
>> inf==inf
ans =
     1

Regards,

Albert

> -----Original Message-----
> From: numpy-discussion-admin at lists.sourceforge.net [mailto:numpy-
> discussion-admin at lists.sourceforge.net] On Behalf Of Simon Burton
> Sent: 15 May 2006 09:09
> To: numpy-discussion at lists.sourceforge.net
> Subject: [Numpy-discussion] numpy.float64(numpy.NaN)!=numpy.NaN
> 
> 
> >>> numpy.float64(numpy.NaN)==numpy.NaN
> False
> 
> Hmm. Bug or feature ?
> 
> >>> numpy.__version__
> 0.9.7.2502
> 
> Simon.





More information about the NumPy-Discussion mailing list