Skip to content

Commit

Permalink
Merge pull request #82 from eelregit/eelregit_likelihood_patch
Browse files Browse the repository at this point in the history
Fix reversed include_logdet bug
  • Loading branch information
EiffL authored Jan 20, 2022
2 parents 06d348a + 76e0e6e commit 8226428
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jax_cosmo/likelihood.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This module implements a few likelihoods useful
# This module implements a few useful likelihoods
import jax.numpy as np
import jax.scipy as sp

Expand Down Expand Up @@ -51,7 +51,7 @@ def gaussian_log_likelihood(data, mu, C, include_logdet=True, inverse_method="in
raise NotImplementedError
rT_Cinv_r = r.dot(y)

if include_logdet:
if not include_logdet:
return -0.5 * rT_Cinv_r
else:
if sparse.is_sparse(C):
Expand Down

0 comments on commit 8226428

Please sign in to comment.