It's simple to see what the problem is.
Try,
>>> a = np.array([[1,2,3,4], [5,6,7,8], [9,10,11,12]])
>>> a.shape
and then
>>>a = np.array([[1,2,3,4], [5,6,7,8], [9,10,11]])
>>> a.shape
and you will see the problem yourself, that in case two, shape is (3,).Hence the too many indices.