[Numpy-discussion] MA bug or feature?
pgmdevlist at mailcan.com
Tue Jul 4 01:39:59 CDT 2006
I wonder whether the Mask class you suggest is not a bit overkill. There
should be enough tools in the existing MA module to do what we want. And I
don't wanna think about compatibility the number of changes in the MA code
that'd be required (but I'm lazy)...
For the sake of consistency and optimization, I still think it could be easier
(and cleaner) to make `nomask` the default for a MaskedArray without masked
values. That could for example be implemented by forcing `nomask` at the
creation of the MaskedArray with an extra
`if mask and not mask.any(): mask=nomask`, or by using Paul's
make_mask( flag=1) trick.
Masking some specific values could still be done when mask is nomask with an
intermediary MA.getmaskarray() step.
On a side note, modifying an existing mask is a delicate matter. Everything's
OK if you use masks as a way to hide existing data, it's more complex when
initially you have some holes in your dataset...
More information about the Numpy-discussion