From e30cc02edbe2c85e671cd54d766ecc3eae6eafbc Mon Sep 17 00:00:00 2001 From: Chaithya G R Date: Mon, 8 Mar 2021 15:59:16 +0100 Subject: [PATCH] Update flag for convergence (#99) Co-authored-by: chaithyagr --- modopt/opt/algorithms.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modopt/opt/algorithms.py b/modopt/opt/algorithms.py index 2ce25775..333f6791 100644 --- a/modopt/opt/algorithms.py +++ b/modopt/opt/algorithms.py @@ -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)):