📜  删除轴 numpy 数组 - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:43.711000             🧑  作者: Mango

代码示例1
x = np.array([[[0], [1], [2]]])
x.shape
(1, 3, 1)
np.squeeze(x).shape
(3,)
np.squeeze(x, axis=0).shape
(3, 1)
np.squeeze(x, axis=1).shape