[Numpy-discussion] Performance problems with strided arrays in NumPy

Travis Oliphant oliphant at ee.byu.edu
Fri Apr 14 16:04:02 CDT 2006

faltet at xot.carabos.com wrote:

>I'm seeing some slowness in NumPy when dealing with strided arrays.
>numarray is dealing better with these situations, so I guess that
>something could be done in NumPy about this. Below are the situations
>that I've found up to now (maybe there are others). For the timings,
>I've used numpy and numarray 1.5.1.

What I've found in experiments like this in the past is that numarray is 
good at striding in one direction but much worse at striding in another 
direction for multi-dimensional arrays.   Of course my experiments were 
not complete.  That just seemed to be the case.

The array-iterator construct handles almost all of these cases.   The 
copy method is a good place to start since it uses that code.


More information about the Numpy-discussion mailing list