In short, this is because it is a one-dimensional array (hence, a singleton tuple of a form). Perhaps the following will help clarify the situation:
>>> np.array([1, 2, 3]).shape
(3,)
>>> np.array([[1, 2, 3]]).shape
(1, 3)
>>> np.array([[1], [2], [3]]).shape
(3, 1)
We can even go into three dimensions (and higher):
>>> np.array([[[1]], [[2]], [[3]]]).shape
(3, 1, 1)
source
share