2013-08-20 43 views

回答

1

在你的符號中,IDL插補功能使用一作爲輸入值的,作爲輸入橫座標值的bc是要插入到的期望的橫座標值。

在蟒蛇(一維),這將是scipy.interpolate.interp1d

from scipy import interpolate 
interpfunc = interpolate.interp1d(b,a, kind='linear') 
x=interpfuc(c) 

SciPy的包括更多的插值功能,包括interp2d和的GridData,你可能會發現有用: http://docs.scipy.org/doc/scipy/reference/interpolate.html