In SciPy, what is 'slinear' interpolation?
python, scipy
Solution
Looking at the source of `scipy/interpolate/interpolate.py`, `slinear` is a spline of order 1
if kind in ['zero', 'slinear', 'quadratic', 'cubic']:
order = {'nearest': 0, 'zero': 0,'slinear': 1,
'quadratic': 2, 'cubic': 3}[kind]
kind = 'spline'
...
if kind in ('linear', 'nearest'):
# Make a "view" of the y array that is rotated to the interpolation
# axis.
minval = 2
if kind == 'linear':
self._call = self._call_linear
elif kind == 'nearest':
self.x_bds = (x[1:] + x[:-1]) / 2.0
self._call = self._call_nearest
else:
minval = order + 1
self._call = self._call_spline
self._spline = splmake(x, y, order=order)
Since the docs for `splmake` state:
def splmake(xk, yk, order=3, kind='smoothest', conds=None):
"""
Return a representation of a spline given data-points at internal knots
...
Problem
I can't find an explanation in the documentation or anywhere online. What does 'slinear' stand for and what does it do?