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 byevaluate_polynomial().- Parameters:
x (_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]) – See
fit_polynomial().data (_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]) – See
fit_polynomial().degree (Integral) – See
fit_polynomial().axis (Integral) – See
fit_polynomial().new_x (Union[float, ArrayLike]) – The evaluation points, a scalar or an array of shape \((N',)\).
- Returns:
The predicted values, with the shape of
datawhere the axis has the length \(N'\) (or is removed for a scalarnew_x).- Return type: