Have you considered using .transpose(...) instead? 

In [4]: a = numpy.ones((3,4,5,6))

In [5]: a.transpose(2,0,1,3).shape
Out[5]: (5, 3, 4, 6)

In [6]: a.transpose(0,2,1,3).shape
Out[6]: (3, 5, 4, 6)

In [7]: a.transpose(0,1,2,3).shape
Out[7]: (3, 4, 5, 6)

In [8]: a.transpose(0,1,3,2).shape
Out[8]: (3, 4, 6, 5)