cond = 1e-5
U, log_pdet, rank = _psd_pinv_decomposed_log_pdet(cov, cond)
pinv = np.dot(U, U.T)
_, log_pdet_pinv, rank = _psd_pinv_decomposed_log_pdet(pinv, cond)
// Check that the log pseudo-determinant agrees with the sum
// of the logs of all but the smallest eigenvalue
After Change
// Set cond so that the lowest eigenvalue is below the cutoff
cond = 1e-5
psd = _PSD(cov, cond=cond)
psd_pinv = _PSD(psd.pinv, cond=cond)
// Check that the log pseudo-determinant agrees with the sum
// of the logs of all but the smallest eigenvalue
assert_allclose(psd.log_pdet, np.sum(np.log(s[:-1])))