chaospy.coefficients_to_quadrature

chaospy.coefficients_to_quadrature(coeffs)[source]

Construct Gaussian quadrature abscissas and weights from three terms recurrence coefficients.

Examples:
>>> distribution = chaospy.Normal(0, 1)
>>> coeffs, = chaospy.construct_recurrence_coefficients(4, distribution)
>>> coeffs
array([[0., 0., 0., 0., 0.],
       [1., 1., 2., 3., 4.]])
>>> (abscissas,), (weights,) = chaospy.coefficients_to_quadrature(coeffs)
>>> abscissas.round(4)
array([-2.857 , -1.3556, -0.    ,  1.3556,  2.857 ])
>>> weights.round(4)
array([0.0113, 0.2221, 0.5333, 0.2221, 0.0113])