[Numpy-discussion] Re: ndarray.fill and ma.array.filled

Sasha ndarray at mac.com
Fri Apr 7 16:31:03 CDT 2006


On 4/7/06, Pierre GM <pgmdevlist at mailcan.com> wrote:
> ...
> We're going towards MA as the default object.
>
I will be against changing the array structure to handle missing
values.  Let's keep the discussion focuced on the interface. Once we
agree on the interface, it will be clear if any structural changes are
necessary.


> But then again, what would be the behavior to deal with missing values ?

We can postpone this discussion as well. Just add mask attribute that
returns False and filled method that returns a copy is an example of a
minimalistic change.

> Using R-like na.actions ? That'd be great, but it's getting more complex.
>

I don't like na.actions.  I think missing values should behave like
IEEE NaNs and in the floating point case should be represented by
NaNs.  The functionality provided by na.actions can always be achieved
by calling an extra function (filled or compress).

> Oh, and another thing: if 'mask', or 'masked' becomes a default attribute of
> ndarrays, how do we define a mask? As a boolean ndarray whose 'mask' is
> always 'False' ? How do you __repr__ it ?
>

See above. For ndarray mask is always False unless an add-on module is
loaded that redefines arithmetic to recognize special bit-patterns
such as NaN or INT_MIN.




More information about the Numpy-discussion mailing list