Skip to content

Commit

Permalink
Update flag for convergence (#99)
Browse files Browse the repository at this point in the history
Co-authored-by: chaithyagr <chaithyagr@gitlab.com>
  • Loading branch information
chaithyagr and chaithyagr authored Mar 8, 2021
1 parent c77eb32 commit e30cc02
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions modopt/opt/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,9 @@ def _iterations(self, max_iter, bar=None):
self.converge:
self._compute_metrics()

if self.converge and self.verbose:
print(' - Converged!')
if self.converge:
if self.verbose:
print(' - Converged!')
break

if not isinstance(bar, type(None)):
Expand Down

0 comments on commit e30cc02

Please sign in to comment.