Re: [Numpy-discussion] Optimize speed of for loop using numpy

2008-02-27 Thread Trond Kristiansen
Hey all. I would just like to thank you all for extremely good feedback on my problem with optimizing loops. Thank you all for being so helpful. Cheers, Trond ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailma

Re: [Numpy-discussion] Optimize speed of for loop using numpy

2008-02-25 Thread Trond Kristiansen
ng me. Cheers, Trond On 2/25/08 9:15 PM, "Robert Kern" <[EMAIL PROTECTED]> wrote: > On Mon, Feb 25, 2008 at 8:08 PM, Trond Kristiansen <[EMAIL PROTECTED]> wrote: >> >> >> Hi all. >> This is my first email to the discussion group. I have spent tw

[Numpy-discussion] Optimize speed of for loop using numpy

2008-02-25 Thread Trond Kristiansen
Hi all. This is my first email to the discussion group. I have spent two days trying to get a particular loop to speed up, and the best result I got was this: tmp1=zeros((eta,xi),float) tmp2=zeros((eta,xi),float) tmp1=tmp1+1 tmp2=tmp2+1 for i in range(xi): for j in range(eta):