core.density.interpolation.interpolated_sample_and_log_prob

core.density.interpolation.interpolated_sample_and_log_prob(
    sample_points,
    values,
)

Given a distribution discretized on a grid, return a sample and the log prob from an interpolated distribution. Wraps the bilby.core.prior.Interped class.

Parameters

Name Type Description Default
sample_points np.ndarray x values for samples required
values np.ndarray y values for samples. The distribution does not have to be initially normalized, although the final log_prob will be. required

Returns

Name Type Description
(float, float) : sample and log_prob