'Parameters
x : ndarray
Points at which to evaluate the log of the probability
density function
dim : int
Dimension of the scale matrix
df : int
Degrees of freedom
scale : ndarray
Scale matrix
log_det_scale : float
Logarithm of the determinant of the scale matrix
C : ndarray
Cholesky factorization of the scale matrix, lower triagular.
Notes
As this function does no argument checking, it should not be
called directly; use \'logpdf\' instead.'

def _logpdf(self, x, dim, df, scale, log_det_scale, C):

    log_det_x = np.zeros(x.shape[(-1)])
    scale_inv_x = np.zeros(x.shape)
    tr_scale_inv_x = np.zeros(x.shape[(-1)])
    for i in range(x.shape[(-1)]):
        (_, log_det_x[i]) = self._cholesky_logdet(x[:, :, i])
        scale_inv_x[:, :, i] = scipy.linalg.cho_solve((C, True), x[:, :, i])
        tr_scale_inv_x[i] = scale_inv_x[:, :, i].trace()
    out = ((((0.5 * ((df - dim) - 1)) * log_det_x) - (0.5 * tr_scale_inv_x)) - (((((0.5 * df) * dim) * _LOG_2) + ((0.5 * df) * log_det_scale)) + multigammaln((0.5 * df), dim)))
    return out
