I want to do the equivalent of permute.m
in MATLAB for an array in Python.
For example: A
is a 4D array with the shape (50,50,3,100)
that I want to make (100,50,50,3)
. In MATLAB this can be done:
B = permute(A,[4,1,2,3])
How to do this in Python?