Answers for "python create a grid of points"

0

python create a grid of points

import numpy as np
# define the lower and upper limits for x and y
minX, maxX, minY, maxY = 0., 20000., 10000., 50000.
# create one-dimensional arrays for x and y
x = np.linspace(minX, maxX, (maxX-minX)/2000.+1)
y = np.linspace(minY, maxY, (maxY-minY)/2000.+1)
# create the mesh based on these arrays
X, Y = np.meshgrid(x, y)
Posted by: Guest on August-06-2021

Python Answers by Framework

Browse Popular Code Answers by Language