'Parameters
x : ndarray
Points at which to evaluate the log of the probability
density function
mean : ndarray
Mean of the distribution
prec_U : ndarray
A decomposition such that np.dot(prec_U, prec_U.T)
is the precision matrix, i.e. inverse of the covariance matrix.
log_det_cov : float
Logarithm of the determinant of the covariance matrix
Notes
As this function does no argument checking, it should not be
called directly; use \'logpdf\' instead.'

def _logpdf(self, x, mean, prec_U, log_det_cov):

    dim = x.shape[(-1)]
    dev = (x - mean)
    maha = np.sum(np.square(np.dot(dev, prec_U)), axis=(-1))
    return ((-0.5) * (((dim * _LOG_2PI) + log_det_cov) + maha))
