gaussian_polynomial_integral
gaussian_polynomial_integral(powers, coefficients, means, covariances, expansion_degree=None, expansion_center=None, return_expansion=False):
Average a polynomial over normalized, possibly correlated Gaussians.
powers has shape (terms, dimension); ordinary monomial coefficients
have shape (…, terms), means (…, dimension), and covariances
(…, dimension, dimension). Their leading axes broadcast. Extra value
axes can be broadcast explicitly into means and covariances.
Contributions are grouped by Taylor degree about expansion_center
(the Gaussian mean by default). Truncation does not truncate the input
polynomial’s degree. A displaced center also allows complex means from
plane-wave factors, including odd Taylor orders. With center == mean,
only degree 2*k contributes and k counts covariance pairings.
Return the sum, or contributions of shape (…, expansion_degree + 1). The complete integral is exact when no degree is supplied. No overlap or Gaussian normalization factor is included. Zero polynomial terms and repeated or non-downward-closed exponent lists are supported.