Consider the following numpy array.
a = np.random.randn(10, 3, 20)
When I index the array as follow, it produces another array with expected shape
b = a[0, :, 0:5]
b.shape = (3, 5)
But when I index it with another numpy array but with similar elements, it produces a different array, which is transpose of the above result.
j = np.arange(0, 5, 1)
b = a[0, :, j]
b.shape = (5, 3)
I couldn't understand why this is the case.