A reimplementation of MaskedArray

Pierre GM pgmdevlist at mailcan.com
Mon Oct 16 01:32:20 CDT 2006


Folks,
I just posted on the scipy/developers zone wiki 
(http://projects.scipy.org/scipy/numpy/wiki/MaskedArray) a reimplementation 
of the masked_array mopdule, motivated by some problems I ran into while  
subclassing MaskedArray.

The main differences with the initial numpy.core.ma package are that 
MaskedArray is now a subclass of ndarray and that the _data section can now 
be any subclass of ndarray (well, it should work in most cases, some tweaking 
might required here and there). Apart from a couple of issues listed below, 
the behavior of the new MaskedArray class reproduces the old one. It is quite 
likely to be significantly slower, though: I was more interested in a clear 
organization than in performance, so I tended to use wrappers liberally. I'm 
sure we can improve that rather easily. 

The new module, along with a test suite and some utilities, are available 
here:
http://projects.scipy.org/scipy/numpy/attachment/wiki/MaskedArray/maskedarray.py
http://projects.scipy.org/scipy/numpy/attachment/wiki/MaskedArray/masked_testutils.py
http://projects.scipy.org/scipy/numpy/attachment/wiki/MaskedArray/test_maskedarray.py

Please note that it's still a work in progress (even if it seems to work quite 
OK when I use it). Suggestions, comments, improvements and general feedback 
are more than welcome !

-------------------------------------------------------------------------
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




More information about the Numpy-discussion mailing list