On Fri, Oct 2, 2009 at 7:51 PM, Neal Becker <[email protected]> wrote: > I need to write functions that apply element-wise numpy arrays, and should > be independent of the number of dimensions. > > numpy has a mechanism for generic (dimension-independent) iteration over > elements of the array, but is there any way to use this (or implement > something similar) in cython? > > _______________________________________________ > Cython-dev mailing list > [email protected] > http://codespeak.net/mailman/listinfo/cython-dev >
Hi Neal. I don't know exactly where Dag is right now on his great work with "numpy under cython's covers" but you can simply use pointer arithmetic.. right. Numpy has a set of macros it uses and if I remember correctly there is documentation of a their simple algorithm somewhere... maybe it was in Travis's numpy book.. I don't exactly remember the doc right now. If I come across it I'll come back and post it. _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
