[Numpy-discussion] in(np.nan) on python 2.6

Christopher Barker Chris.Barker at noaa.gov
Thu Dec 4 16:17:50 EST 2008


josef.pktd at gmail.com wrote:
>>> Raise a ValueError (even in 2.5, therefore risking to break something)

+1 as well

> it took me a while to figure out that some
> mysteriously appearing zeros were nans that were silently converted
> during casting to int.

and this is why -- a zero is a perfectly valid and useful number, NaN 
should never get cast to a zero (or any other valid number) unless the 
user explicitly asks it to be.

I think the right choice was made for python 2.6 here.

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov



More information about the NumPy-Discussion mailing list