my_array = numpy.zeros(1, 1000)
for i in range(1000):
    my_array[i] = functionToGetValue(i)
my_array[i:] = functionToGetValue(i)
my_array[:, (i)] = functionToGetValue(i)
Building up an array in numpy/scipy by iteration in Python?