Re: [Numpy-discussion] Help in speeding up accumulation in a matrix

2011-01-30 Thread Nicolas SCHEFFER
Hi all, Thanks for all of the answers, it gives me a lot of new ideas and new functions I didn't know of. @Charles: The reshape way is a great idea! It gives a great alternative to the for loop for your code to be vectorized. I tested it I get %timeit scale_and_add_reshape(R,w,Msr) 1 loops, best o

Re: [Numpy-discussion] Help in speeding up accumulation in a matrix

2011-01-30 Thread Gregor Thalhammer
Am 29.1.2011 um 22:01 schrieb Nicolas SCHEFFER: > Hi all, > > First email to the list for me, I just want to say how grateful I am > to have python+numpy+ipython etc... for my day to day needs. Great > combination of software. > > Anyway, I've been having this bottleneck in one my algorithms th

Re: [Numpy-discussion] Help in speeding up accumulation in a matrix

2011-01-29 Thread josef . pktd
On Sat, Jan 29, 2011 at 5:30 PM, Charles R Harris wrote: > > > On Sat, Jan 29, 2011 at 2:01 PM, Nicolas SCHEFFER > wrote: >> >> Hi all, >> >> First email to the list for me, I just want to say how grateful I am >> to have python+numpy+ipython etc... for my day to day needs. Great >> combination o

Re: [Numpy-discussion] Help in speeding up accumulation in a matrix

2011-01-29 Thread eat
Hi, On Sat, Jan 29, 2011 at 11:01 PM, Nicolas SCHEFFER < scheffer.nico...@gmail.com> wrote: > Hi all, > > First email to the list for me, I just want to say how grateful I am > to have python+numpy+ipython etc... for my day to day needs. Great > combination of software. > > Anyway, I've been havi

Re: [Numpy-discussion] Help in speeding up accumulation in a matrix

2011-01-29 Thread Charles R Harris
On Sat, Jan 29, 2011 at 2:01 PM, Nicolas SCHEFFER < scheffer.nico...@gmail.com> wrote: > Hi all, > > First email to the list for me, I just want to say how grateful I am > to have python+numpy+ipython etc... for my day to day needs. Great > combination of software. > > Anyway, I've been having thi

Re: [Numpy-discussion] Help in speeding up accumulation in a matrix

2011-01-29 Thread Nicolas SCHEFFER
Thanks for the prompt reply! I quickly tried that and it actually helps compared to the full vectorized version. Depending on the dimensions, the chunk size has to be tuned (typically 100 or so) But I don't get any improvement w/r to the simple for loop (i can almost match the time though). My gue

Re: [Numpy-discussion] Help in speeding up accumulation in a matrix

2011-01-29 Thread Benjamin Root
On Saturday, January 29, 2011, Nicolas SCHEFFER wrote: > Hi all, > > First email to the list for me, I just want to say how grateful I am > to have python+numpy+ipython etc... for my day to day needs. Great > combination of software. > > Anyway, I've been having this bottleneck in one my algorithm

[Numpy-discussion] Help in speeding up accumulation in a matrix

2011-01-29 Thread Nicolas SCHEFFER
Hi all, First email to the list for me, I just want to say how grateful I am to have python+numpy+ipython etc... for my day to day needs. Great combination of software. Anyway, I've been having this bottleneck in one my algorithms that has been bugging me for quite a while. The objective is to sp