I want to be able to \'build\' a numpy array on the fly, I do not know the size of this array in advance.
For example I want to do something like this:
Build a Python list and convert that to a Numpy array. That takes amortized O(1) time per append + O(n) for the conversion to array, for a total of O(n).
a = [] for x in y: a.append(x) a = np.array(a)