Numeric array and for loops problem

Stan dragonscraft at yahoo.it
Fri Jan 10 04:31:43 EST 2003


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 ;)




More information about the Python-list mailing list