laguerre_quadrature#

assetlife.quadratures.laguerre_quadrature(func, lower_bound, args=(), deg=10)[source]#

Numerical integration of \(f(x) * exp(-x)\) over the interval \([a, \infty]\).

Parameters:
funcCallable

A function of the form y = func(x, a, b, c, …) taking floats or ndarrays as inputs and returning a np.float64 or an ndarray. a, b, c, … are extra arguments that must be passed in the args parameter.

lower_boundfloat or ndarray

The lower bound of the integration.

argsfloat or ndarray

Extra arguments used in the function call.

degint, default is 10.

Number of sample points and weights for the quadrature

Returns:
outnp.float64 or np.ndarray

Notes

The function computes if y = func(x, a, b, c, …) has a compatible shape with lower_bound. Otherwise, adapt lower_bound or change func implementation.