Numpy的索引切片 索引 In [72]: arr = np.array([[[1,1,1],[2,2,2]],[[3,3,3],[4,4,4]]]) In [73]: arr Out[73]: array([[[1, 1, 1], [2, 2, 2]], [[3, 3, 3], [4, 4, 4]]]) In [74]: arr.ndim Out[74]: 3 In [75]: arr.shape Out[75]: (2, 2, 3) In [76]: arr[0] #返回降低一个维度的数组