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