legendre_quadrature#

relife.utils.quadrature.legendre_quadrature(func, a, b, deg=10)[source]#

Numerical integration of \(f(x)\) over the interval \([a,b]\)

func must accept (deg,), (deg, n) or (deg, m, n) array shapes a can be zero b must not be inf

a, b shapes can be either 0d (float like), 1d or 2d