[SciPy-user] nan puzzle

Andrew Straw strawman at astraw.com
Tue Jul 12 22:25:43 CDT 2005


I haven't used it, but the fpconst module is supposed to deal with this 
situation.

e.g. fpconst.isNaN(val)

fpconst home:
http://research.warnes.net/projects/RStatServer/fpconst/

The draft PEP:
http://www.python.org/peps/pep-0754.html

Alan G Isaac wrote:
> Is this expected behavior?
> Thank you,
> Alan Isaac
> 
> 
>>>>z=[0,1,nan]
>>>>x=nan
>>>>x
> 
> -1.#IND
> 
>>>>x is nan
> 
> True
> 
>>>>x=z[2]
>>>>x
> 
> -1.#IND
> 
>>>>x is nan
> 
> False
> 



More information about the SciPy-user mailing list