bilby.core.utils.calculus.logtrapzexp
- bilby.core.utils.calculus.logtrapzexp(lnf, dx)[source]
Perform trapezium rule integration for the logarithm of a function on a grid.
- Parameters:
- lnf: array_like
A
numpy.ndarray
of values that are the natural logarithm of a function- dx: Union[array_like, float]
A
numpy.ndarray
of steps sizes between values in the function, or a single step size value.
- Returns:
- The natural logarithm of the area under the function.