如何使用 python 定义高阶样条?

How to define a higher-degree spline using python?

我正在使用 Scipy CubicSpline interpolation based on a certain number of points as shown in the diagram below:

我的问题是,Cubic Splive 函数的二阶导数看起来有点急躁:

为了平滑第二条曲线,我需要更高程度的样条插值。是否有 Scipy 内置函数(类似于 CubicSpline)或一种简单的方法? (b 样条函数需要工作)

make_interp_spline 应该能够构造更高阶的 BSpline 对象(FITPACK 仅上升到 k=5,这是相当深的硬编码)。