[Numpy-discussion] question about a data structure
Christopher Barker
Chris.Barker@noaa....
Wed Jul 29 16:54:24 CDT 2009
Robert Kern wrote:
> 2009/7/29 Ernest Adrogué <eadrogue@gmx.net>:
>> Now, I need to be able to differentiate between 0 and 'no data'.
>> Is it possible to do this with the standard array class?
>
> Not really. Use masked arrays. Or use a dictionary.
masked arrays are made precisely for this. However, if you can use
floating point numbers, you could use NaN for the no data entries.
-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@noaa.gov
More information about the NumPy-Discussion
mailing list