consider the following code :
test_1 = np.zeros((2, 2))
test_2 = np.zeros((2, 2, 1))
print(test_1[..., np.newaxis])
print(test_1[np.newaxis])
Result :
[[[0.]
[0.]]
[[0.]
[0.]]]
[[[0. 0.]
[0. 0.]]]
I really don't understand the meaning of this '...' and why the two lines don't produce a similar array. Do you have an idea ? Thanks a lot !