summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2019-06-04 04:57:46 -0400
committerEdoardo Pasca <edo.paskino@gmail.com>2019-06-04 04:57:46 -0400
commitd688da2c586e3165bc366772668ecb008d03eca3 (patch)
tree914338f88a7278fae3dd94652e86184acea4685f /Wrappers/Python
parent31410bc217c7de4659e5df35f3423fdbbd04f59a (diff)
downloadframework-d688da2c586e3165bc366772668ecb008d03eca3.tar.gz
framework-d688da2c586e3165bc366772668ecb008d03eca3.tar.bz2
framework-d688da2c586e3165bc366772668ecb008d03eca3.tar.xz
framework-d688da2c586e3165bc366772668ecb008d03eca3.zip
fix print for python27
Diffstat (limited to 'Wrappers/Python')
-rwxr-xr-xWrappers/Python/ccpi/optimisation/algorithms/Algorithm.py15
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