From d5a8a76f060ce680ec190b8b735184d8c309f8b5 Mon Sep 17 00:00:00 2001 From: Stephen L Date: Wed, 25 Nov 2015 23:43:01 +0100 Subject: [PATCH] comments + remove self Signed-off-by: Stephen L. --- tqdm/_tqdm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tqdm/_tqdm.py b/tqdm/_tqdm.py index 264c2c00..ea8773b8 100644 --- a/tqdm/_tqdm.py +++ b/tqdm/_tqdm.py @@ -398,11 +398,13 @@ class tqdm(object): # to the maximum iteration rate seen so far. if dynamic_miniters and delta_t: if mininterval: + # weight delta_it with ema to try to converge + # miniters towards the timeframe of mininterval miniters = smoothing * delta_it * mininterval \ / delta_t + (1 - smoothing) * miniters else: miniters = smoothing * delta_it + \ - (1 - self.smoothing) * self.miniters + (1 - smoothing) * miniters # Store old values for next call last_print_n = n