Neal Becker wrote: > Where can I find a (hopefully simple) example of c-code for a ufunc? > > Probably in scipy.special and or umathmodule.c in numpy/core/src. The key is to register a 1-d "inner" loop that performs the basic calculation for a particular data-type.
You also need to provide the C-function and arrays that indicate the data-types that the C-function accepts to ufunc. The umathmodule.c is harder to track because it is "auto-generated", so the scipy.special (cephesmodule.c) may be easier to understand. Best regards, -Travis O. _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion