pysdic.numeric.evaluate_polynomial#

evaluate_polynomial(coefficients, x, *, axis=-1)[source]#

Evaluate polynomials given by their coefficients in increasing degree (Horner scheme).

Parameters:
  • coefficients (ArrayLike) – The coefficients \((c_0, \dots, c_d)\) along axis (e.g. the output of fit_polynomial()).

  • x (Union[float, ArrayLike]) – The evaluation points, a scalar or an array of shape \((N',)\).

  • axis (Integral, optional (default: -1)) – The axis of the coefficients.

Returns:

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

Return type:

numpy.ndarray