[Numpy-discussion] ANN: MaskedArray as a subclass of ndarray - followup

Travis Oliphant oliphant at ee.byu.edu
Wed Jan 17 18:11:31 CST 2007


Eric Firing wrote:

>Pierre GM wrote:
>  
>
>>All,
>>I've updated this famous reimplementation of maskedarray I keep ranting about.
>>    
>>
>[...]
>  
>
>>I also put the file `timer_comparison.py`, that runs some unittests with each 
>>implementation
>>(numpy.core.ma and maskedarray), and outputs the minimum times.
>>On my machine, there doesn't seem to be a lot of differences, maskedarray 
>>being slightly faster.
>>    
>>
>
>Same for mine: Thinkpad T41, Pentium M, ubuntu Edgy:
>
>efiring at manini:~/programs/py/tests$ python timer_comparison.py
>#1..................................................
>numpy.core.ma: 0.492 - 0.493
>maskedarray  : 0.481 - 0.482
>#2..................................................
>numpy.core.ma: 1.440 - 1.440
>maskedarray  : 1.215 - 1.215
>#3..................................................
>numpy.core.ma: 2.272 - 2.274
>maskedarray  : 2.156 - 2.156
>
>
>I admit that I have not studied the question, but my impression is that 
>you have made some nice improvements.  Numpy unified the 
>Numeric/numarray split, but now we have a MaskedArray split.  Any 
>prospect for unification, say in numpy 1.1?  Might it make sense for 
>maskedarray to replace numpy.core.ma in 1.1?
>  
>

This makes sense to me.   I'm generally favorable to the new maskedarray 
(I actually like the idea of it being a sub-class).  I'm just waiting 
for people that actually use the MaskedArray to comment.

For 1.1 I would really like to move most of the often-used sub-classes 
of the ndarray to the C-level and merge in functionality from CVXOPT.

-Travis



More information about the Numpy-discussion mailing list