From a8a52beadd9b53bbb7fad49d7f9e9817fd1339a5 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Fri, 12 Nov 2021 09:41:17 +0000 Subject: [PATCH] same bug fixed in covariance2 --- pyerrors/obs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyerrors/obs.py b/pyerrors/obs.py index 085c9a95..7e98ae8c 100644 --- a/pyerrors/obs.py +++ b/pyerrors/obs.py @@ -1307,7 +1307,7 @@ def covariance2(obs1, obs2, correlation=False, **kwargs): if r_name not in obs2.e_content[e_name]: continue idl_d[r_name] = _merge_idx([obs1.idl[r_name], obs2.idl[r_name]]) - if idl_d[r_name] is range: + if isinstance(idl_d[r_name], range): r_length.append(len(idl_d[r_name])) else: r_length.append((idl_d[r_name][-1] - idl_d[r_name][0] + 1))