I have a NumPy array (2,4) and I want to rotate it 90 degrees to the left and I use np.rot90
For example, if my array is
x = [[5,6,7,8],
[1,2,3,4]]
and when I rotate, it will be
y = [[8,4],
[7,3],
[6,2],
[5,1]]
x is (2,4) NumPy array and y will be (4,2)
y = np.rot90(x)
But when I run this code I get this failure
x and y must have the same first dimension, but have shapes (4,) and (2,)