import numpy as np
ret = np.array([])
for i in range(100):
    tmp = np.random.rand(np.random.randint(1, 100))
ret.resize(len(ret) + len(tmp))
ret[-len(tmp):] = tmp
How to extend an array in-place in Numpy?