I am running into errors when concatenating arrays in Python:
x = np.array([])
while condition:
% some processing
x = np.concatenate([x + new_x])
The error I get is:
----> 1 x = np.concatenate([x + new_x])
ValueError: operands could not be broadcast together with shapes (0) (6)
On a side note, is this an efficient way to grow a numpy array in Python?
xon every iteration, I am not sure I would necessarily call this "efficient".