[Numpy-discussion] feedback request: proposal to add masks to the core ndarray

Robert Kern robert.kern@gmail....
Fri Jun 24 11:25:06 CDT 2011


On Fri, Jun 24, 2011 at 11:13, Christopher Barker <Chris.Barker@noaa.gov> wrote:
> Nathaniel Smith wrote:
>
>> If we think that the memory overhead for floating point types is too
>> high, it would be easy to add a special case where maybe(float) used a
>> distinguished NaN instead of a separate boolean.
>
> That would  be pretty cool, though in the past folks have made a good
> argument that even for floats, masks have significant advantages over
> "just using NaN". One might be that you can mask and unmask a value for
> different operations, without losing the value.

No one is suggesting that the NA approach is universal or replaces
masked arrays. It's better at some things and worse at others. For
many things, usually tables of statistical data, "unmasking" makes no
sense; the missing data is forever missing. For others, particularly
cases where you have gridded data, unmasking and remasking can be
quite useful. They are complementary tools.

-- 
Robert Kern

"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 NumPy-Discussion mailing list