# scipy.interpolate.KroghInterpolator¶

class scipy.interpolate.KroghInterpolator(xi, yi)

The interpolating polynomial for a set of points

Constructs a polynomial that passes through a given set of points, optionally with specified derivatives at those points. Allows evaluation of the polynomial and all its derivatives. For reasons of numerical stability, this function does not compute the coefficients of the polynomial, although they can be obtained by evaluating all the derivatives.

Be aware that the algorithms implemented here are not necessarily the most numerically stable known. Moreover, even in a world of exact computation, unless the x coordinates are chosen very carefully - Chebyshev zeros (e.g. cos(i*pi/n)) are a good choice - polynomial interpolation itself is a very ill-conditioned process due to the Runge phenomenon. In general, even with well-chosen x values, degrees higher than about thirty cause problems with numerical instability in this code.

Based on [R4].

Parameters : xi : array-like, length N Known x-coordinates yi : array-like, N by R Known y-coordinates, interpreted as vectors of length R, or scalars if R=1. When an xi occurs two or more times in a row, the corresponding yi’s represent derivative values.

References

 [R4] (1, 2) Krogh, “Efficient Algorithms for Polynomial Interpolation and Numerical Differentiation”, 1970.

Methods

 __call__(x) Evaluate the polynomial at the point x derivative(x, der) Evaluate one derivative of the polynomial at the point x derivatives(x[, der]) Evaluate many derivatives of the polynomial at the point x

#### Previous topic

scipy.interpolate.BarycentricInterpolator.set_yi

#### Next topic

scipy.interpolate.KroghInterpolator.__call__