[Numpy-discussion] About Reshape()
Stephen Walton
stephen.walton at csun.edu
Fri May 13 14:13:22 EDT 2005
andrea_gavana at tin.it wrote:
>This continuous use of transpose() is killing the performances of my scripts...
>is there a workaround? Am I missing something so obvious?
>
>
Not necessarily obvious, but you've hit the old problem that MATLAB
stores arrays in column major order (first index varies most rapidly,
borrowed from Fortran), while Numeric and numarray store arrays in row
major order (borrowed from C). The only way to avoid the transpose()
calls is to rework your algorithms to work on arrays stored in row major
order.
More information about the NumPy-Discussion
mailing list