Re: [Numpy-discussion] 2-d in-place operation performance vs 1-d non in-place

2007-09-06 Thread Timothy Hochberg
On 9/6/07, George Sakkis <[EMAIL PROTECTED]> wrote: > > On Sep 5, 12:29 pm, Francesc Altet <[EMAIL PROTECTED]> wrote: > > A Wednesday 05 September 2007, George Sakkis escrigué: > > > > > > > > > I was surprised to see that an in-place modification of a 2-d array > > > turns out to be slower from th

Re: [Numpy-discussion] 2-d in-place operation performance vs 1-d non in-place

2007-09-06 Thread George Sakkis
On Sep 5, 12:29 pm, Francesc Altet <[EMAIL PROTECTED]> wrote: > A Wednesday 05 September 2007, George Sakkis escrigué: > > > > > I was surprised to see that an in-place modification of a 2-d array > > turns out to be slower from the respective non-mutating operation on > > 1- d arrays, although the

Re: [Numpy-discussion] 2-d in-place operation performance vs 1-d non in-place

2007-09-05 Thread Francesc Altet
A Wednesday 05 September 2007, George Sakkis escrigué: > I was surprised to see that an in-place modification of a 2-d array > turns out to be slower from the respective non-mutating operation on > 1- d arrays, although the latter creates new array objects. Here is > the benchmarking code: > > impo

[Numpy-discussion] 2-d in-place operation performance vs 1-d non in-place

2007-09-05 Thread George Sakkis
I was surprised to see that an in-place modification of a 2-d array turns out to be slower from the respective non-mutating operation on 1- d arrays, although the latter creates new array objects. Here is the benchmarking code: import timeit for n in 10,100,1000,1: setup = 'from numpy.rand