fix tqdm for the case where the total sample number is unknown

This commit is contained in:
Valentin Boettcher 2021-12-07 11:09:40 +01:00
parent 11c21d28b4
commit 6ea296da26

View file

@ -212,7 +212,7 @@ def ensemble_mean(
10,
)
for res in tqdm(result_iter, total=(N - 1)):
for res in tqdm(result_iter, total=(N - 1) if N else None):
aggregate.update(res)
if every is not None and (aggregate.n % every) == 0 or aggregate.n == N: