1

In SciPy's interpolation module there is a function called interp1d. The documentation says that it is a spline interpolation: http://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.interp1d.html I could however nowhere find what is the boundary condition on the endpoints. For instance, in the case of a cubic spline, one should specify the derivatives (or the second derivatives) at the endpoints. What are the values used by interp1d?

Botond
  • 2,640
  • 6
  • 28
  • 44
  • 1
    By default, the `interp1d` code uses the `splmake` function with `kind=smoothest`. That lands in the `_find_smoothest` function, [here](https://github.com/scipy/scipy/blob/72ccbc19970f9b54f1d5a28a87e89da798547dbb/scipy/interpolate/interpolate.py#L2612-L2636). Though what exactly that's computing, I'm not quite sure. :-) It does look as though this is different from a natural spline, which would have been my first guess. – Mark Dickinson Aug 18 '16 at 09:06
  • Related: http://stackoverflow.com/questions/36088340/what-algorithm-used-in-interp1d-function-in-scipy-interpolate – Mark Dickinson Aug 18 '16 at 09:18

1 Answers1

1

CubicSpline, which is new in scipy 0.18, allows a user control over the boundary conditions. Neither FITPACK nor interp1d do.

ev-br
  • 24,968
  • 9
  • 65
  • 78