[Numpy-discussion] feedback request: proposal to add masks to the core ndarray

Mark Wiebe mwwiebe@gmail....
Fri Jun 24 19:41:27 CDT 2011

On Fri, Jun 24, 2011 at 4:24 PM, Nathaniel Smith <njs@pobox.com> wrote:

> On Fri, Jun 24, 2011 at 12:26 PM, Mark Wiebe <mwwiebe@gmail.com> wrote:
> > For the maybe dtype, it would need to gain access to the ufunc loop of
> the
> > underlying dtype, and call it appropriately during the inner loop. This
> > appears to require some more invasive upheaval within the ufunc code than
> > the masking approach.
> Not really -- it can just set up some shim ndarray structures, and
> then use the standard top-level ufunc entry-point. (Well, this does
> assume that ufunc machinery is re-entrant. If it uses global variables
> or something to hold per-call state then we might be in trouble.)

That sounds like it would be very slow to me. Once you're in the C world,
especially in an inner loop, going back into the Python world is not a good
idea from a performance perspective.


> -- Nathaniel
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20110624/3d9c1fe6/attachment.html 

More information about the NumPy-Discussion mailing list