[Numpy-discussion] What's the most numpythonic way to support multiple types in a C extension?

John Salvatier jsalvati@u.washington....
Tue Jun 26 16:53:57 CDT 2012


I want to support multiple types in the index_increment function that I've
written here:
https://github.com/jsalvatier/numpy/blob/master/numpy/core/src/multiarray/mapping.c

I need to check that the first argument's type can support addition, cast
the dataptr to the appropriate type and do the addition operation for that
type. It looks like some of the numpy code uses .c.src files to do
templating. Is that what I want to do here? Is the syntax described
somewhere?

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120626/4eb737fe/attachment.html 


More information about the NumPy-Discussion mailing list