Skip to content

Commit c4d98e5

Browse files
authored
Update pygad.py
1 parent 4ad007e commit c4d98e5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pygad.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,7 +1256,7 @@ def run(self):
12561256
self.population[parents_to_keep.shape[0]:, :] = self.last_generation_offspring_mutation
12571257

12581258
self.generations_completed = generation + 1 # The generations_completed attribute holds the number of the last completed generation.
1259-
1259+
self.on_mutation(self, self.last_generation_offspring_mutation)
12601260
# Measuring the fitness of each chromosome in the population. Save the fitness in the last_generation_fitness attribute.
12611261
self.last_generation_fitness = self.cal_pop_fitness()
12621262

@@ -3481,4 +3481,4 @@ def load(filename):
34813481
raise FileNotFoundError("Error reading the file {filename}. Please check your inputs.".format(filename=filename))
34823482
except:
34833483
raise BaseException("Error loading the file. If the file already exists, please reload all the functions previously used (e.g. fitness function).")
3484-
return ga_in
3484+
return ga_in

0 commit comments

Comments
 (0)