python中的增量插值(通过牛顿多项式)

时间:2019-11-16 10:44:12

标签: python numpy interpolation

假设我的x和y坐标如下:

x = np.array([-1, 0, 1, 2]) # x coords
y = np.array([1, 5, 2, 0]) # y coords

如何定义方法,以便:

  1. 我可以用多项式对这些点进行插值。是的,我知道通过this方法并不难。但是。

  2. 给出一个新点(或者更好的几个新点):

x_new = np.array([4, 5]) # new x coords
y_new = np.array([0.5, -3.5]) # new y coords

如何在不重新计算整个点数组的情况下更新在步骤1中拥有的多项式? Here被告知这是可能的。

我查看了scipy.interpolate,但无法准确找到我想要的内容。

任何帮助,不胜感激!

0 个答案:

没有答案