Perhaps the 2 by 2 matrix is a little small and a little misleading. One should think we have an array with n = 3 (for example) dimensions say A. Then reverse(A, dims = 1)
should be thought of a new array B such that B[start,:,:] = A[end,:,:], B[start +1, :, :] = A[end- 1,:, :] etc. For dims = 2
we do the same but on the second index (i.e. A[:,k,:])
3 Likes