Re: [Numpy-discussion] faster code

2010-05-17 Thread Francesc Alted
A Monday 17 May 2010 20:11:28 Keith Goodman escrigué: > On Mon, May 17, 2010 at 11:06 AM, Francesc Alted wrote: > > A Sunday 16 May 2010 21:14:34 Davide Lasagna escrigué: > >> Hi all, > >> > >> What is the fastest and lowest memory consumption way to compute this? > >> > >> y = np.arange(2**24) >

Re: [Numpy-discussion] faster code

2010-05-17 Thread Keith Goodman
On Mon, May 17, 2010 at 11:06 AM, Francesc Alted wrote: > A Sunday 16 May 2010 21:14:34 Davide Lasagna escrigué: >> Hi all, >> >> What is the fastest and lowest memory consumption way to compute this? >> >> y = np.arange(2**24) >> bases = y[1:] + y[:-1] >> >> Actually it is already quite fast, but

Re: [Numpy-discussion] faster code

2010-05-17 Thread Francesc Alted
A Sunday 16 May 2010 21:14:34 Davide Lasagna escrigué: > Hi all, > > What is the fastest and lowest memory consumption way to compute this? > > y = np.arange(2**24) > bases = y[1:] + y[:-1] > > Actually it is already quite fast, but i'm not sure whether it is occupying > some temporary memory >

Re: [Numpy-discussion] faster code

2010-05-16 Thread Keith Goodman
On Sun, May 16, 2010 at 1:18 PM, Eric Firing wrote: > On 05/16/2010 09:24 AM, Keith Goodman wrote: >> On Sun, May 16, 2010 at 12:14 PM, Davide Lasagna >>  wrote: >>> Hi all, >>> What is the fastest and lowest memory consumption way to compute this? >>> y = np.arange(2**24) >>> bases = y[1:] + y[:

Re: [Numpy-discussion] faster code

2010-05-16 Thread Davide Lasagna
Well, actually np.arange(2**24) was just to test the following line ;). I'm particularly concerned about memory consumption rather than speed. On 16 May 2010 22:53, Brent Pedersen wrote: > On Sun, May 16, 2010 at 12:14 PM, Davide Lasagna > wrote: > > Hi all, > > What is the fastest and lowest m

Re: [Numpy-discussion] faster code

2010-05-16 Thread Brent Pedersen
On Sun, May 16, 2010 at 12:14 PM, Davide Lasagna wrote: > Hi all, > What is the fastest and lowest memory consumption way to compute this? > y = np.arange(2**24) > bases = y[1:] + y[:-1] > Actually it is already quite fast, but i'm not sure whether it is occupying > some temporary memory > is the

Re: [Numpy-discussion] faster code

2010-05-16 Thread Eric Firing
On 05/16/2010 09:24 AM, Keith Goodman wrote: > On Sun, May 16, 2010 at 12:14 PM, Davide Lasagna > wrote: >> Hi all, >> What is the fastest and lowest memory consumption way to compute this? >> y = np.arange(2**24) >> bases = y[1:] + y[:-1] >> Actually it is already quite fast, but i'm not sure wh

Re: [Numpy-discussion] faster code

2010-05-16 Thread Keith Goodman
On Sun, May 16, 2010 at 12:14 PM, Davide Lasagna wrote: > Hi all, > What is the fastest and lowest memory consumption way to compute this? > y = np.arange(2**24) > bases = y[1:] + y[:-1] > Actually it is already quite fast, but i'm not sure whether it is occupying > some temporary memory > is the

[Numpy-discussion] faster code

2010-05-16 Thread Davide Lasagna
Hi all, What is the fastest and lowest memory consumption way to compute this? y = np.arange(2**24) bases = y[1:] + y[:-1] Actually it is already quite fast, but i'm not sure whether it is occupying some temporary memory is the summation. Any help is appreciated. Cheers Davide