[Numpy-discussion] NA masks in the next numpy release?
Mon Oct 24 13:09:37 CDT 2011
Charles R Harris writes:
> It might useful to have a way of setting global defaults, or something like a
> with statement. These are the sort of things that can be adjusted based on
> experience. For instance, I'm thinking skipna=1 is the natural default for the
> masked arrays.
I already raised this concern during the initial discussions, and Mark came up
with nice solution.
Instead of having an additional stateful global interface that code would have
to check in addition to the "skipna" argument, you can have a simple function
that takes and/or constructs an ndarray and redefines its ufunc wrapper to
always set the "skipna = True" argument.
"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
More information about the NumPy-Discussion