【发布时间】:2015-05-06 15:55:31
【问题描述】:
我正在尝试按如下方式实例化 Scipy Interpolate RectBivariateSpline:
import numpy as np
from scipy.interpolate import RectBivariateSpline
x = np.array([1,2,3,4])
y = np.array([1,2,3])
vals = np.array([
[4,1,4],
[4,2,3],
[3,7,4],
[2,4,5]
])
print(x.shape) # (4,)
print(y.shape) # (3,)
print(vals.shape) # (4, 3)
rect_B_spline = RectBivariateSpline(x, y, vals)
但是,它返回此错误:
Traceback (most recent call last):
File "path/file", line 15, in <module>
rect_B_spline = RectBivariateSpline(x, y, vals)
File "path/file", line 1061, in __init__
ye, kx, ky, s)
dfitpack.error: (my>ky) failed for hidden my: regrid_smth:my=3
希望能提供任何有关 dfitpack 错误描述和解决方法的线索。
【问题讨论】:
标签: python numpy scipy interpolation