bilby.compat.patches.multivariate_logpdf

bilby.compat.patches.multivariate_logpdf(xp, mean, cov)[source]

Return a function to evaluate the log probability density of a multivariate Gaussian with given mean vector and covariance matrix for the provided array backend.

Parameters:
xp: numpy, torch, jax.numpy

A module that will resolve to numpy, torch, or jax.numpy in array_api_compat.is_..._namespace.

mean: array-like

A one-dimensional array providing the mean of the distribution.

cov: array-like

A two-dimensional array providing the covariance matrix of the distribution.

Returns:
logpdf: callable

A callable that provides the log probaility density provided an array of points to evaluate at.