[Numpy-discussion] feedback request: proposal to add masks to the core ndarray
Fri Jun 24 19:41:27 CDT 2011
On Fri, Jun 24, 2011 at 4:24 PM, Nathaniel Smith <email@example.com> wrote:
> On Fri, Jun 24, 2011 at 12:26 PM, Mark Wiebe <firstname.lastname@example.org> wrote:
> > For the maybe dtype, it would need to gain access to the ufunc loop of
> > 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion