[Numpy-discussion] Are masked arrays slower for processing than ndarrays?

Matthew Brett matthew.brett@gmail....
Wed May 13 18:53:23 CDT 2009


> Whine. I was afraid of something like that...
> 2 options, then:
> * We revert to computing a mask beforehand. That looks like the part
> that takes the most time w/ domained operations (according to Robert
> K's profiler. Robert, you deserve a statue for this tool). And that
> doesn't solve the pb of power, anyway: how do you compute the domain
> of power ?
> * We reimplement masked versions of the ufuncs in C. Won't happen from
> me anytime soon (this fall or winter, maybe...)
> Also, importing numpy.ma currently calls numpy.seterr(all='ignore')
> anyway...

I'm afraid I don't know the code at all, so count this as seems good,
but I had the feeling that the change is good for speed but possibly
bad for stability / readability?

In that case it seems right not to do that, and wait until someone
needs speed enough to write it in C or similar...



More information about the Numpy-discussion mailing list