在 Python 中连接数组时遇到错误:
x = np.array([])
while condition:
% some processing
x = np.concatenate([x + new_x])
我得到的错误是:
----> 1 x = np.concatenate([x + new_x])
ValueError: operands could not be broadcast together with shapes (0) (6)
顺便说一句,这是在 Python 中增长 numpy 数组的有效方法吗?
最佳答案
关于python - 与空 numpy 数组连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13729322/