Sorry for commenting after the merge there is a `logdet` function you might want to use here. Also, the naming could be more consistent: `hasCholesky` vs `log_partial_gamma`.