From: Robert K. <rob...@gm...> - 2006-06-02 00:16:59
|
Christopher Barker wrote: > Robert Kern wrote: > >>points = mgrid[minx:maxx, miny:maxy].reshape(2, -1).transpose() > > As I need Numeric and numarray compatibility at this point, it seems the > best I could come up with is below. Ah. It might help if you said that up front. (Untested, but what I usually did in the bad old days before I used scipy): x = arange(minx, maxx+step, step) # oy. y = arange(miny, maxy+step, step) nx = len(x) ny = len(y) x = repeat(x, ny) y = concatenate([y] * nx) points = transpose([x, y]) -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco |