diff options
author | Edoardo Pasca <edo.paskino@gmail.com> | 2019-06-04 09:57:34 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-04 09:57:34 +0000 |
commit | e3e75557b81d1bf0eed9055958d0feb6638b8618 (patch) | |
tree | 914338f88a7278fae3dd94652e86184acea4685f | |
parent | 31410bc217c7de4659e5df35f3423fdbbd04f59a (diff) | |
parent | d688da2c586e3165bc366772668ecb008d03eca3 (diff) | |
download | framework-e3e75557b81d1bf0eed9055958d0feb6638b8618.tar.gz framework-e3e75557b81d1bf0eed9055958d0feb6638b8618.tar.bz2 framework-e3e75557b81d1bf0eed9055958d0feb6638b8618.tar.xz framework-e3e75557b81d1bf0eed9055958d0feb6638b8618.zip |
Merge pull request #297 from vais-ral/algorithm_print27
fix print for python27
-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 |