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

Stefan van der Walt stefan at sun.ac.za
Fri Jan 19 05:40:01 EST 2007

On Thu, Jan 18, 2007 at 06:18:22PM +0000, Matt Knox wrote:
> > 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.
> Moving the implementation to the C-level would be awesome. In particular,
> __getitem__ and __setitem__ are incredibly slow with masked arrays compared to
> ndarrays, so using those inside python loops is basically a really bad idea
> currently. You always have to work with the _data and _mask attributes directly
> if you are concerned about performance.

Moving the implementation to the C-level also has its downside.  To
me, at least, Python code is much more readable and hence easier to

Is there a way that we can implement only the speed-critical methods
in C?


More information about the NumPy-Discussion mailing list