np.squeeze(y)使用示例 y = [[0] [0] [0] [0] [1] [0]...] a = np.squeeze(y) print(a) 结果如下: [0 0 0 0 1 0 ...]