Search code examples
pythonscipyinterpolationspline

What is the difference of use cases between scipy.interpolate.splrep and scipy.interpolate.UnivariateSpline?


It looks like quite the same, except this note in the UnivariateSpline manual:

splrep: An older, non object-oriented wrapping of FITPACK

Return values are not described for UnivariateSpline.

So, is UnivariateSpline a replacement for splrep, or are use cases not totally the same?


Solution

  • That comment in the docs is outdated. Both interfaces wrap the same FITPACK implementation. So the difference us only that one interface is object-oriented, and the other one uses functions. (and is therefore easier to use in conjunction with the BSpline object)