小编Kev*_*dra的帖子

NumPy 中的 x.shape[0] 与 x[0].shape

比方说,我有一个数组

x.shape = (10,1024)

当我尝试打印 x[0].shape

x[0].shape
Run Code Online (Sandbox Code Playgroud)

它打印 1024

当我打印 x.shape[0]

x.shape[0]
Run Code Online (Sandbox Code Playgroud)

它打印 10

我知道这是一个愚蠢的问题,也许还有另一个类似的问题,但有人可以向我解释一下吗?

python arrays numpy

13
推荐指数
2
解决办法
4万
查看次数

标签 统计

arrays ×1

numpy ×1

python ×1