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))