[Numpy-discussion] ufuncs for structured arrays

Jay Bourque jay.bourque at continuum.io
Mon Oct 1 11:36:58 EDT 2012


I've submitted the following pull request for NumPy:


This change allows ufuncs to be registered for structured arrays by using a
new API method PyUFunc_RegisterLoopForStructType. For example, a ufunc
could be registered to take two arrays of type 'u8,u8,u8' and return an
array of type 'u8,u8,u8'. I have a trivial example of this included in my
pull request, along with further details of my changes. I suspect there
might be a better way to do this, so any suggestions for improvements would
be welcome.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20121001/24e27fb1/attachment.html>

More information about the NumPy-Discussion mailing list