import numpy arr = numpy.array(...) for i in range(len(arr)):
import numpy m = numpy.ones((3,5),dtype='int') for row in m: # do stuff with row