numpy.swapaxes()

numpy.swapaxes

numpy.swapaxes(a, axis1, axis2) [source]

Interchange two axes of an array.

Parameters:

a : array_like

Input array.

axis1 : int

First axis.

axis2 : int

Second axis.

Returns:

a_swapped : ndarray

For Numpy >= 1.10, if a is an