Skip to content

Commit

Permalink
print_function
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Jun 28, 2017
1 parent ac510d3 commit e720876
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Solid/ParticleSwarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def run(self, verbose=True):
self.cur_steps += 1

if ((i + 1) % 100 == 0) and verbose:
print self
print(self)

u1 = zeros((self.swarm_size, self.swarm_size))
u1[diag_indices_from(u1)] = [random() for x in range(self.swarm_size)]
Expand All @@ -188,7 +188,7 @@ def run(self, verbose=True):
self._global_best()

if self._objective(self.global_best[0]) < self.min_objective:
print "TERMINATING - REACHED MINIMUM OBJECTIVE"
print("TERMINATING - REACHED MINIMUM OBJECTIVE")
return self.global_best[0], self._objective(self.global_best[0])
print "TERMINATING - REACHED MAXIMUM STEPS"
print("TERMINATING - REACHED MAXIMUM STEPS")
return self.global_best[0], self._objective(self.global_best[0])

0 comments on commit e720876

Please sign in to comment.