我正在使用scipy的插值包。在 splprep 函数的文档中,它说在返回值中,还有包含样条拟合残差的变量"fp"。http://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.interpolate.splprep.html
我不知道如何检索 fp 值,因为我不能调用具有两个以上返回变量的函数。
以下是我使用的一些示例代码:
from scipy import interpolate
[tck_poly, u] = interpolate.splprep([[1.,2.,3.,4.,5.]])
有谁知道如何获得这种残留物或其他简单的方法来确定适合质量?
指定full_output=True
:
(tck, u), fp, ier, msg = interpolate.splprep([[1.,2.,3.,4.,5.]], full_output=True)