diff options
-rwxr-xr-x | Wrappers/Python/ccpi/optimisation/algorithms/Algorithm.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/Wrappers/Python/ccpi/optimisation/algorithms/Algorithm.py b/Wrappers/Python/ccpi/optimisation/algorithms/Algorithm.py index 78fe196..9f54c1e 100755 --- a/Wrappers/Python/ccpi/optimisation/algorithms/Algorithm.py +++ b/Wrappers/Python/ccpi/optimisation/algorithms/Algorithm.py @@ -167,13 +167,12 @@ class Algorithm(object): t = 0 else: t = sum(timing)/len(timing) - el = [ self.iteration-1, - self.max_iteration, - "{:.3f}".format(t), - self.get_last_objective() ] - - string = self.objective_to_string() - out = "{:>9} {:>10} {:>13} {}".format(*el[:-1] , string) + out = "{:>9} {:>10} {:>13} {}".format( + self.iteration-1, + self.max_iteration, + "{:.3f}".format(t), + self.objective_to_string() + ) return out def objective_to_string(self): @@ -204,4 +203,4 @@ class Algorithm(object): '', '[s]', '') - return out
\ No newline at end of file + return out |