From 76e0e6e55a72841e82f9d4d549fc14c557f99799 Mon Sep 17 00:00:00 2001 From: Yin Li Date: Wed, 19 Jan 2022 12:50:33 -0500 Subject: [PATCH] Fix reversed include_logdet bug --- jax_cosmo/likelihood.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jax_cosmo/likelihood.py b/jax_cosmo/likelihood.py index f6a2519..25ae649 100644 --- a/jax_cosmo/likelihood.py +++ b/jax_cosmo/likelihood.py @@ -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 @@ -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):