Re: [Numpy-discussion] array.sum() slower than expected along some array axes?

2007-02-03 Thread Robert Kern
Stephen Simmons wrote: > The question though is whether all of the inner loop's overhead is > necessary. > My counterexample using numpy.dot() suggests there's considerable scope > for improvement, at least for certain common cases. Well, yes. You most likely have an ATLAS-accelerated dot(). Th

Re: [Numpy-discussion] array.sum() slower than expected along some array axes?

2007-02-03 Thread Stephen Simmons
Charles R Harris wrote: > > > On 2/3/07, *Stephen Simmons* <[EMAIL PROTECTED] > > wrote: > > Hi, > > Does anyone know why there is an order of magnitude difference > in the speed of numpy's array.sum() function depending on the axis > of the matrix summed?

Re: [Numpy-discussion] array.sum() slower than expected along some array axes?

2007-02-03 Thread Charles R Harris
On 2/3/07, Charles R Harris <[EMAIL PROTECTED]> wrote: On 2/3/07, Stephen Simmons <[EMAIL PROTECTED]> wrote: > > Hi, > > Does anyone know why there is an order of magnitude difference > in the speed of numpy's array.sum() function depending on the axis > of the matrix summed? > > To see this,

Re: [Numpy-discussion] array.sum() slower than expected along some array axes?

2007-02-03 Thread Charles R Harris
On 2/3/07, Stephen Simmons <[EMAIL PROTECTED]> wrote: Hi, Does anyone know why there is an order of magnitude difference in the speed of numpy's array.sum() function depending on the axis of the matrix summed? To see this, import numpy and create a big array with two rows: >>> import numpy

Re: [Numpy-discussion] array.sum() slower than expected along some array axes?

2007-02-03 Thread Keith Goodman
On 2/3/07, Robert Kern <[EMAIL PROTECTED]> wrote: > Keith Goodman wrote: > > On 2/3/07, Stephen Simmons <[EMAIL PROTECTED]> wrote: > >> Does anyone know why there is an order of magnitude difference > >> in the speed of numpy's array.sum() function depending on the axis > >> of the matrix summed

Re: [Numpy-discussion] array.sum() slower than expected along some array axes?

2007-02-03 Thread Robert Kern
Keith Goodman wrote: > On 2/3/07, Stephen Simmons <[EMAIL PROTECTED]> wrote: >> Does anyone know why there is an order of magnitude difference >> in the speed of numpy's array.sum() function depending on the axis >> of the matrix summed? >> >> To see this, import numpy and create a big array wi

Re: [Numpy-discussion] array.sum() slower than expected along some array axes?

2007-02-03 Thread Keith Goodman
On 2/3/07, Stephen Simmons <[EMAIL PROTECTED]> wrote: > Does anyone know why there is an order of magnitude difference > in the speed of numpy's array.sum() function depending on the axis > of the matrix summed? > > To see this, import numpy and create a big array with two rows: > >>> impor

[Numpy-discussion] array.sum() slower than expected along some array axes?

2007-02-03 Thread Stephen Simmons
Hi, Does anyone know why there is an order of magnitude difference in the speed of numpy's array.sum() function depending on the axis of the matrix summed? To see this, import numpy and create a big array with two rows:    >>> import numpy    >>> a = numpy.ones([2,100], 'f4') Then using