插值-函数interpn

时间:2019-11-08 05:41:05

标签: python-3.x

如何使用函数internp? I look at manual, but I am confused.

print('A = ',type(A))
print('B = ',type(B))
print('C = ',type(C))
print('Mat = ',type(Mat))


A =  <class 'numpy.ndarray'>
B =  <class 'numpy.ndarray'>
C =  <class 'numpy.ndarray'>
Mat =  <class 'numpy.ndarray'>



Ex=interp.interpn((A,B,C),np.squeeze(Mat[0,:,:,:]),A[0],A[1],A[2], 'linear')

我有一个错误:

ValueError: interpn only understands the methods 'linear', 'nearest', and 'splinef2d'. You provided [[ -1.00000000e-03  -1.00000000e-03  -1.00000000e-03  -1.00000000e-03
   -1.00000000e-03  -1.00000000e-03  -1.00000000e-03  -1.00000000e-03
   -1.00000000e-03  -1.00000000e-03  -1.00000000e-03  -1.00000000e-03

0 个答案:

没有答案