Consider a Numpy array
x = array(
[[4, 0, 3, 3],
[7, 9, 3, 5],
[2, 4, 7, 6],
[8, 8, 1, 6]])
Consider these 3 commands
x[: , 0]
x[: , 0:1]
x[: , [0]]
The first one yields array([4, 7, 2, 8])
, while the second and third return
array(
[[4],
[7],
[2],
[8]])
What explains this difference in behaviour ?