[SciPy-user] NaN's in numpy (and Scipy)
robert.kern at gmail.com
Thu Jan 4 21:37:08 CST 2007
Alan Jackson wrote:
> I've been working with numnpy (Numeric actually, we're a little behind), in a
> framework that requires that we allow for NaN's to appear at random in our
> arrays. We have handled that with masked arrays, but I am finding those
> somewhat awkward to work with, and given that the NaN's will normally be
> rare, it seems a shame to double the storage costs that way.
> Any suggestions for a better overall strategy for dealing with NaN's?
It depends. What do you want to do with them? Why do they show up in your data?
I.e. is your framework using them to represent missing data? or are they simply
showing up from computations (0/0)?
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the SciPy-user