python create a grid of points

Solutions on MaxInterview for python create a grid of points by the best coders in the world

showing results for - "python create a grid of points"
Silvia
19 Jul 2016
1import numpy as np
2# define the lower and upper limits for x and y
3minX, maxX, minY, maxY = 0., 20000., 10000., 50000.
4# create one-dimensional arrays for x and y
5x = np.linspace(minX, maxX, (maxX-minX)/2000.+1)
6y = np.linspace(minY, maxY, (maxY-minY)/2000.+1)
7# create the mesh based on these arrays
8X, Y = np.meshgrid(x, y)
9