Some things to note:

The mask is copy-on-write. Don't mess with that. You can't just poke values into an existing mask, it may be shared with other arrays.

I do not agree that there is any 'inconsistency'. It may be someone's concept of the class that if there is a mask then at least one value is on, but that was not my design. I believe if you try your ideas you'll find it slows other people down, if not you.

Perhaps with all of Travis' new machinery, subclassing works. It didn't used to, and I haven't kept up.


On 7/3/06, Pierre GM < [EMAIL PROTECTED]> wrote:
Michael,
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...

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to