📜  python 创建点网格 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:31.231000             🧑  作者: Mango

代码示例1
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)