Is there way to initialize a numpy array of a shape and add to it? I will explain what I need with a list example. If I want to create a list of objects generated in a loop,
Array analogue for the python's
a = [] for i in range(5): a.append(i)
is:
import numpy as np a = np.empty((0)) for i in range(5): a = np.append(a, i)