python numpy array change axis

Solutions on MaxInterview for python numpy array change axis by the best coders in the world

showing results for - "python numpy array change axis"
Lucia
04 Jun 2018
1>>> x = np.array([[1,2,3]])
2>>> np.swapaxes(x,0,1)
3array([[1],
4       [2],
5       [3]])
6