'Parameters
dims : tuple
Dimensions of the matrix variates
X : ndarray
Points at which to evaluate the log of the probability
density function
mean : ndarray
Mean of the distribution
row_prec_rt : ndarray
A decomposition such that np.dot(row_prec_rt, row_prec_rt.T)
is the inverse of the among-row covariance matrix
log_det_rowcov : float
Logarithm of the determinant of the among-row covariance matrix
col_prec_rt : ndarray
A decomposition such that np.dot(col_prec_rt, col_prec_rt.T)
is the inverse of the among-column covariance matrix
log_det_colcov : float
Logarithm of the determinant of the among-column covariance matrix
Notes
As this function does no argument checking, it should not be
called directly; use \'logpdf\' instead.'

def _logpdf(self, dims, X, mean, row_prec_rt, log_det_rowcov, col_prec_rt, log_det_colcov):

    (numrows, numcols) = dims
    roll_dev = np.rollaxis((X - mean), axis=(-1), start=0)
    scale_dev = np.tensordot(col_prec_rt.T, np.dot(roll_dev, row_prec_rt), 1)
    maha = np.sum(np.sum(np.square(scale_dev), axis=(-1)), axis=0)
    return ((-0.5) * (((((numrows * numcols) * _LOG_2PI) + (numcols * log_det_rowcov)) + (numrows * log_det_colcov)) + maha))
