my last post for this topic. i've found this nice way to to the loops worldarray = Numeric.zeros((worldx,worldy)) y = 0 for line in lines: vals = split(line) x = 0 for val in vals: worldarray[x,y] = float(val) x +=1 y += 1 f.close() hope helpfull for someone ;)