[Numpy-discussion] Removing masked arrays for 1.7? (Was 1.7 blockers)

Fernando Perez fperez.net at gmail.com
Fri Apr 20 14:35:29 EDT 2012


On Fri, Apr 20, 2012 at 11:27 AM, Dag Sverre Seljebotn
<d.s.seljebotn at astro.uio.no> wrote:
>
> I don't think you gain that much by using a different type though? Those optimized code paths could be plugged into NumPy as well.

Could be: this was years ago, and the bottleneck for me was in the
constructor and in basic arithmetic.  I had to make millions of these
vectors and I needed to do basic arithmetic, but they were always 1-d
and had one to 6 entries only.  So writing a very static constructor
with very low overhead did make a huge difference in that project.

Also, when I wrote this code numpy didn't exist, I was using Numeric.

Perhaps the same results could be obtained in numpy itself with
judicious coding, I don't know.  But in that project, ~600 lines of
really easy pyrex code (it would be cython today) made a *huge*
performance difference for me.

Cheers,

f



More information about the NumPy-Discussion mailing list