BarycentricInterpolator.add_xi(xi, yi=None)[source]#

Add more x values to the set to be interpolated

The barycentric interpolation algorithm allows easy updating by adding more points for the polynomial to pass through.


The x coordinates of the points that the polynomial should pass through.

yiarray_like, optional

The y coordinates of the points the polynomial should pass through. Should have shape (xi.size, R); if R > 1 then the polynomial is vector-valued. If yi is not given, the y values will be supplied later. yi should be given if and only if the interpolator has y values specified.


The new points added by add_xi are not randomly permuted so there is potential for numerical instability, especially for a large number of points. If this happens, please reconstruct interpolation from scratch instead.