Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@chengs
Copy link
Contributor

@chengs chengs commented Sep 6, 2018

in the function __iter__, the variable smoothing may not be written back to the self object, which causes the issue #566.

This PR fix the problem by fixing a bug found by @simonm3 in #566.

Maybe helpful for #449

@chengs chengs changed the title fix smoothing in for #566 fix smoothing bug #566 Sep 6, 2018
@chengs chengs changed the title fix smoothing bug #566 fix smoothing bug Sep 6, 2018
@codecov-io
Copy link

codecov-io commented Sep 6, 2018

Codecov Report

Merging #601 into master will decrease coverage by 0.27%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #601      +/-   ##
==========================================
- Coverage   99.14%   98.87%   -0.28%     
==========================================
  Files           9        9              
  Lines         704      709       +5     
  Branches      125      127       +2     
==========================================
+ Hits          698      701       +3     
- Misses          3        5       +2     
  Partials        3        3

avg_time = delta_t / delta_it \
if avg_time is None \
else smoothing * delta_t / delta_it + \
(1 - smoothing) * avg_time
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here, avg_time is useless because it has never been read. Actually, avg_time should be written back to self.avg_time

@casperdcl casperdcl added p3-enhancement 🔥 Much new such feature to-review 🔍 Awaiting final confirmation labels Sep 7, 2018
@casperdcl
Copy link
Member

thanks

casperdcl added a commit that referenced this pull request Sep 10, 2018
@casperdcl casperdcl merged commit 922d1e2 into tqdm:master Sep 10, 2018
@chengs chengs deleted the avg_time branch September 11, 2018 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p3-enhancement 🔥 Much new such feature to-review 🔍 Awaiting final confirmation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants