a = np.arange(3) b = np.arange(12).reshape((3, 4)) c = np.arange(24).reshape((2, 3, 4)) # it returns the size of the first dimension (=np.shape[0]) print(len(a)) # 3 print(len(b)) # 3 print(len(c)) # 2