I am not so at ease with use of np.swapaxes
and set aside my proudness to ask this possibly silly question.
Is it normal that considering a 3D array (for instance (2, 4, 3)), np.swapaxes(array, 1,2)
gives same result than np.swapaxes(array, 2,1)
?
array = np.array([[[1.0, -1.0, -2.0],[-1.0, -2.0, -10.0],[-2.0, -10.0, 11.0],[-10.0, 11.0, 4.0]],
[[1.1, -1.1, -2.1],[-1.1, -2.1, -10.1],[-2.1, -10.1, 21.1],[-10.1, 21.1, 2.1]]])
swapaxed1 = np.swapaxes(array, 1,2)
swapaxed2 = np.swapaxes(array, 2,1)
swapaxed1 == swapaxed2
With what dimensions for array
would the results be different?
Thanks for your help to better understand swapaxes
in this case. Bests,