feat: repetative len(sample) calles reintroduced

This commit is contained in:
Fabian Joswig 2021-12-10 16:31:42 +00:00
parent 1ab16612d9
commit 5f2e33ccda

View file

@ -68,9 +68,8 @@ class Obs:
already subtracted from the samples
"""
sample_length = len(samples)
if means is None and sample_length:
if sample_length != len(names):
if means is None and len(samples):
if len(samples) != len(names):
raise Exception('Length of samples and names incompatible.')
if idl is not None:
if len(idl) != len(names):
@ -97,7 +96,7 @@ class Obs:
self.covobs = covobs
self.idl = {}
if sample_length:
if len(samples):
if idl is not None:
for name, idx in sorted(zip(names, idl)):
if isinstance(idx, range):