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

Sasha ndarray at mac.com
Mon May 15 06:38:01 EDT 2006


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



On 5/15/06, Sasha <ndarray at mac.com> wrote:
> It's a feature IEEE standard requires that NaNs are not equal to any
> floating point numbers including other NaNs.
>
> On 5/15/06, Simon Burton <simon at arrowtheory.com> wrote:
> >
> > >>> numpy.float64(numpy.NaN)==numpy.NaN
> > False
> >
> > Hmm. Bug or feature ?
> >
> > >>> numpy.__version__
> > 0.9.7.2502
> >
> > Simon.
> >
> > --
> > Simon Burton, B.Sc.
> > Licensed PO Box 8066
> > ANU Canberra 2601
> > Australia
> > Ph. 61 02 6249 6940
> > http://arrowtheory.com
> >
> >
> > -------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > Numpy-discussion mailing list
> > Numpy-discussion at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/numpy-discussion
> >
>




More information about the NumPy-Discussion mailing list