MAINT: log(det(A)) -> logdet(A)

Computing the determinant and then taking its log should be avoided... Also I think the code comment was incorrect so I've changed it and put it into a docstring.