From dcc24a380632ae5dcd69638a515e5933bd793475 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Thu, 3 Mar 2022 10:40:07 +0000 Subject: [PATCH] refactor: simplification and speed up of the computation of e_N in _covariance_element --- pyerrors/obs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyerrors/obs.py b/pyerrors/obs.py index 5cc33b69..bea49bbb 100644 --- a/pyerrors/obs.py +++ b/pyerrors/obs.py @@ -1446,7 +1446,7 @@ def _covariance_element(obs1, obs2): if r_name not in obs2.e_content[e_name]: continue gamma_div += calc_gamma(np.ones(obs1.shape[r_name]), np.ones(obs2.shape[r_name]), obs1.idl[r_name], obs2.idl[r_name], idl_d[r_name]) - e_N += np.sum(np.ones_like(idl_d[r_name])) + e_N += len(idl_d[r_name]) gamma /= gamma_div # Bias correction hep-lat/0306017 eq. (49)