On 13/12/06, Pierre GM <[EMAIL PROTECTED]> wrote:
> All,
> I have a ND array whose axes I want to reorganize, so that axis "i" is at the
> end while the others stay in their relative position. What's the easiest ?

Generate an axis-permutation tuple and use transpose:

s = list(A.shape)
s.remove(i)
s.append(i)
B = A.transpose(s)

A. M. Archibald
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to