A reimplementation of MaskedArray + MaskedRecords

P GM pgmdevlist at gmail.com
Sun Oct 22 23:24:41 CDT 2006

I updated the alternative implementation of MaskedArray on the wiki, mainly
correct a couple of bugs.

In addition, I attached another file, maskedrecordarray, which introduce a
class, MaskedRecord, as a subclass of recarray and MaskedArray. An instance
of this class accepts a recarray as data, and uses two masks: the
'recordmask' has as many entries as records in the array, each entry with
same fields as a record, but of boolean types, indicating whether a field is

masked or not; an entry is flagged as masked in the 'mask' array if at least

one field is masked. The 'mask' object is introduced mostly for compatibilty

with MaskedArray, only 'recordmask' is really useful.

A few examples in the file should give you an idea of what can be done. In
particular, you can define a new maskedrecord array as simply as ;
a = masked_record([('Alan',29,200.), ('Bill',31,260.0)],
dtype=[('name','S30'),('age',int_),('weight',float_)], mask=[(1,0,0),

Note that maskedrecordarray is still quite experimental. As I'm not a
user of records, I don't really know what should be implemented... The file
can be accessed at

Once again, I need your comments and suggestions !

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20061023/6c440796/attachment-0001.html 
-------------- next part --------------
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
-------------- next part --------------
Numpy-discussion mailing list
Numpy-discussion at lists.sourceforge.net

More information about the Numpy-discussion mailing list