initialize unknown size array pthon code example Example: create array with unknown size in python a = np.array([]) for x in y: a = np.append(a, x)