np.meshgrid()的理解
import numpy as np
pointx = np.array([1,2,3])
pointy = np.array([-1,-2])
mesh = np.meshgrid(pointx,pointy)
mesh
[array([[1, 2, 3],
[1, 2, 3]]),
array([[-1, -1, -1],
[-2, -2, -2]])]
xs, ys = np.meshgrid(pointx,pointy)
xs
array([[1, 2, 3],
[1, 2, 3]])
ys
array([[-1, -1, -1],
[-2, -2, -2]])
那怎么来理解meshgrid呢
![](https://img-blog.csdnimg.cn/20200303165432510.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_40,text_cGhvdG8gYnkgc2h3ZWk=,size_25,color_FFFFFF,t_50,g_center)
参考:https://www.geeksforgeeks.org/numpy-meshgrid-function/