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 [R14].
xi : array_like, length N
yi : array_like, N by R
|[R14]||(1, 2) Krogh, “Efficient Algorithms for Polynomial Interpolation and Numerical Differentiation”, 1970.|
|__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|