pysdic.numeric.polynomial_predict#

polynomial_predict(x, data, degree, new_x, *, axis=-1)[source]#

Fit a polynomial to sampled data along an axis and evaluate it at new points (interpolation or extrapolation).

Shortcut for fit_polynomial() followed by evaluate_polynomial().

Parameters:
Returns:

The predicted values, with the shape of data where the axis has the length \(N'\) (or is removed for a scalar new_x).

Return type:

numpy.ndarray