I generate a list of one dimensional numpy arrays in a loop and later convert this list to a 2d numpy array. I would\'ve preallocated a 2d numpy array if i knew the number o
Even simpler than @Gill Bates' answer, here is an one line code:
np.stack(list_of_arrays, axis=0)