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

2008-06-20 Thread Lisandro Dalcin
On 6/20/08, Gael Varoquaux <[EMAIL PROTECTED]> wrote: > 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 faster than "for i in range(n)"). Regard

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

2008-06-20 Thread Robert Kern
On Fri, Jun 20, 2008 at 14:13, Gael Varoquaux <[EMAIL PROTECTED]> wrote: > On Fri, Jun 20, 2008 at 02:07:08PM -0500, Robert Kern wrote: >> > Does somebody have a example of fast looping through ndarrays using >> > modern Cython idioms? > >> If you're using normal Python indexing, then that's where

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

2008-06-20 Thread Gael Varoquaux
Oups, forgot the attachement. On Fri, Jun 20, 2008 at 09:13:34PM +0200, Gael Varoquaux wrote: > On Fri, Jun 20, 2008 at 02:07:08PM -0500, Robert Kern wrote: > > > Does somebody have a example of fast looping through ndarrays using > > > modern Cython idioms? > > If you're using normal Python inde

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

2008-06-20 Thread Gael Varoquaux
On Fri, Jun 20, 2008 at 02:07:08PM -0500, Robert Kern wrote: > > Does somebody have a example of fast looping through ndarrays using > > modern Cython idioms? > If you're using normal Python indexing, then that's where all your > time is being spent. You need to grab the actual .data pointer and d

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

2008-06-20 Thread Robert Kern
On Fri, Jun 20, 2008 at 09:17, Gael Varoquaux <[EMAIL PROTECTED]> wrote: > 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 faster than "for i

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

2008-06-20 Thread Gael Varoquaux
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<=ihttp://projects.scipy.org/mailman/listinfo/numpy-discussion