numpy中的一个函数叫mgrid
例子
import numpy as np
[X, Y] = np.mgrid[0:1.1:1 / 7., 0:1.1:1 / 7.]
# print(X.shape)
#print(X)
print(Y.shape)
print(Y)
生成两个8*8的矩阵
numpy中mgrid与meshgrid的区别
https://blog.csdn.net/tymatlab/article/details/79027162
扫描二维码关注公众号,回复:
2386079 查看本文章