[Numpy-discussion] How do I use numpy to do this?

Christopher Barker Chris.Barker at noaa.gov
Thu Jun 1 12:06:02 CDT 2006

I'm trying to get the (x,y) coords for all the points in a grid, bound 
by xmin, xmax, ymin, ymax.

This list comprehension does it fine:

Points = [(x,y) for x in xrange(minx, maxx) for y in xrange(miny, maxy)]

But I can't think at the moment how to do it with numpy. Any ideas?



Christopher Barker, Ph.D.
NOAA/OR&R/HAZMAT         (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov

More information about the Numpy-discussion mailing list