Difference between np.transpose(y) and np.transpose([y])
transpose reverses the axes order. if y = [1,2,3] there is only one axis: y.shape = (3,). So transpose won't do anything.
If y=[[1,2,3]] the there are 2 axes: y.shape = (1,3) and transpose will work as you expect.
Suppose I have y = [1,2,3] (1 X 3 matrix) then np.transpose(y) should be a (3 X 1) matrix but the function transpose is returning the same (1 X 3) matrix.
If I run np.transpose([y]) then it's returning expected (3 X 1) matrix.
Can anyone explain what's happening here?