[Numpy-discussion] Right way of looping throught ndarrays using Cython

Gael Varoquaux gael.varoquaux@normalesup....
Fri Jun 20 09:17:32 CDT 2008


Hi,

I am trying to figure the right way of looping throught ndarrays using
Cython, currently. Things seem to have evolved a bit compared to what
some documents on the web claim (eg "for i from 0<=i<n" does not seem
faster than "for i in range(n)"). I know there is integration of pex with
cython on the horizon, but it is not there yet, and I don't want to
commit to a moving target.

Does somebody have a example of fast looping through ndarrays using
modern Cython idioms?

Cheers,

Gaël


More information about the Numpy-discussion mailing list