我有一个3D numpy浮点数数组.我不正确地索引数组吗?我想访问片124(索引123),但我看到了这个错误:
>>> arr.shape
(31, 285, 286)
>>> arr[:][123][:]
Runtime error
Traceback (most recent call last):
File "<string>", line 1, in <module>
IndexError: index 123 is out of bounds for axis 0 with size 31
Run Code Online (Sandbox Code Playgroud)
这个错误的原因是什么?