我想使用 numpy/scipy 在 python 中推断 3d 图。外推是通过曲线拟合完成的。请参阅以下具有不同 x 和 y 大小的数据。
x = np.array([740,760,780,800,820,840,860,880,900,920,940,960]) # Presssure in mBar
y = np.array([1500,1800,2100,2400,2700,3000,3300,3600,3900]) # Rpm
# Fuel Amount in micro seconds
z = np.array([[1820,1820,1820,1820,2350,2820,3200,3440,3520,3600,3600,3600],
[1930,1930,1930,2170,2700,2880,3240,3580,3990,3990,3990,3990],
[1900,1900,2370,2680,2730,3050,3450,3760,3970,3970,3970,3970],
[2090,2090,2240,2410,2875,3180,3410,3935,4270,4270,4270,4270],
[1600,2180,2400,2700,2950,3290,3780,4180,4470,4470,4470,4470],
[2100,2280,2600,2880,3320,3640,4150,4550,4550,4550,4550,4550],
[2300,2460,2810,3170,3400,3900,4280,4760,4760,4760,4760,4760],
[2170,2740,3030,3250,3600,4100,4370,4370,4370,4370,4370,4370],
[2240,2580,2870,3275,3640,4050,4260,4260,4260,4260,4260,4260]])
Scipy 具有 scipy.interpolate.interp2d 类,但它仅在 x 和 y 大小相同时进行插值。 http://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.interpolate.interp2d.html
我想在 y 轴点 900 和 1200 和 x 轴点 720 处外推曲线。
IE
xNew = (720,x)
yNew = (900,1200,y)
因为我没有 z = f(x,y) 的函数。对于上述情况,如何在 python 中进行曲线拟合并获得所需点的曲线值。