【发布时间】:2021-01-16 18:10:08
【问题描述】:
假设我有一张这样的图片
image.shape=(280,280,3)
如果我做img[[[1,2],[1,2],[1,2]]].shape,我得到(2,)。但我希望获得(2,2,2)...
如何在numpy中同时对多个维度进行切片?
【问题讨论】:
标签: numpy numpy-ndarray
假设我有一张这样的图片
image.shape=(280,280,3)
如果我做img[[[1,2],[1,2],[1,2]]].shape,我得到(2,)。但我希望获得(2,2,2)...
如何在numpy中同时对多个维度进行切片?
【问题讨论】:
标签: numpy numpy-ndarray
【讨论】: