2024-04-24 02:31:59 发布
网友
如果我尝试使用for循环,我会得到indexeror。你知道吗
有什么好办法吗?你知道吗
对数组使用^{}方法。(它也可用作NumPy函数,np.reshape())
np.reshape()
试试这个:
import numpy as np arr = np.random.random((10000, 10, 10)) arr.reshape((10000, 100, 1))
一般来说,几乎不需要NumPy数组的循环。你知道吗
对数组使用^{} 方法。(它也可用作NumPy函数,
np.reshape()
)试试这个:
一般来说,几乎不需要NumPy数组的循环。你知道吗
相关问题 更多 >
编程相关推荐