[Numpy-discussion] Missing data again
Lluís
xscript at gmx.net
Wed Mar 7 13:21:54 EST 2012
Charles R Harris writes:
[...]
> One inconvenience I have run into with the current API is that is should be
> easier to clear the mask from an "ignored" value without taking a new view or
> assigning known data.
AFAIR, the inability to directly access a "mask" attribute was intentional to
make bit-patterns and masks indistinguishable from the POV of the array user.
What's the workflow that leads you to un-ignore specific elements?
> So maybe two types of masks (different payloads), or an additional flag could
> be helpful.
Do you mean different NA values? If that's the case, I think it was taken into
account when implementing the current mechanisms (and was also mentioned in the
NEP), so that it could be supported by both bit-patterns and masks (as one of
the main design points was to make them indistinguishable in the common case).
I think the name was "parametrized dtypes".
> The process of assigning masks could also be made a bit easier than using
> fancy indexing.
I don't get what you mean here, sorry.
Do you mean here that this is too cumbersome to use?
>>> a[a < 5] = np.NA
(obviously oversimplified example where everything looks sufficiently simple :))
Lluis
--
"And it's much the same thing with knowledge, for whenever you learn
something new, the whole world becomes that much richer."
-- The Princess of Pure Reason, as told by Norton Juster in The Phantom
Tollbooth
More information about the NumPy-Discussion
mailing list