[Numpy-discussion] feedback request: proposal to add masks to the core ndarray
Fri Jun 24 13:09:50 CDT 2011
On Fri, Jun 24, 2011 at 11:25 AM, Robert Kern <email@example.com> wrote:
> On Fri, Jun 24, 2011 at 11:13, Christopher Barker <Chris.Barker@noaa.gov>
> > 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.
It appears to me that views of arrays with masks as in my proposal can
support this masking/unmasking semantics without breaking the missing value
abstraction. It would be nice for these concepts to fit together well in a
single system, anyhow.
> 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
> NumPy-Discussion mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion