30 May
2014
30 May
'14
6:45 p.m.
On Fri, May 30, 2014 at 8:48 AM, Bob Dowling <rjd4+numpy@cam.ac.uk> wrote:
Is there a clean way to create a view on an existing ND-array with its axes in a different order.
There's an epidemic of axes reordering, the exact same thing was asked yesterday in StackOverflow: http://stackoverflow.com/questions/23943379/swapping-the-dimensions-of-a-num... Aside from the general solution provided by Robert, for your use case, where you just want to move a single axis to a different position, you may want to use `np.rollaxis`: http://docs.scipy.org/doc/numpy/reference/generated/numpy.rollaxis.html Jaime -- (\__/) ( O.o) ( > <) Este es Conejo. Copia a Conejo en tu firma y ayúdale en sus planes de dominación mundial.