摘要: #三维点插值#在三维空间中,利用实际点的值推算出网格点的值import numpy as np point_grid =np.array([[0.0,0.0,0.0],[0.4,0.4,0.4],[0.8,0.8,0.8],[1.0,1.0,1.0]])#网格点坐标 def func(x, y, z): return x*(1-x)*np.cos(4*np.pi*x) * (np.... 阅读全文
posted @ 2017-11-15 14:17 秋华 阅读(26957) 评论(0) 推荐(0) 编辑
摘要: import numpy as np #data 原来数组 #arr_1 新数组 #将data的第一列赋值给arr_1的第一列 arr_1 = np.array((data.shape[0],5)) arr_1[:,0] = data[:,0] #报错 # arr_1[:,0] = data[:,0]#id #IndexError: too many indices for ar... 阅读全文
posted @ 2017-11-15 14:01 秋华 阅读(18244) 评论(0) 推荐(0) 编辑