Skip to content

Commit 03bde3d

Browse files
Matias GonzalezMatias Gonzalez
authored andcommitted
extradata fix
1 parent 79464c8 commit 03bde3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pygad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2115,7 +2115,7 @@ def adaptive_mutation_population_fitness(self, offspring):
21152115
fitness[:self.last_generation_parents.shape[0]] = self.last_generation_fitness[self.last_generation_parents_indices]
21162116

21172117
for idx in range(len(parents_to_keep), fitness.shape[0]):
2118-
fitness[idx] = self.fitness_func(temp_population[idx], None, None)
2118+
fitness[idx] = self.fitness_func(temp_population[idx], self.extra_data, None)
21192119
average_fitness = numpy.mean(fitness)
21202120

21212121
return average_fitness, fitness[len(parents_to_keep):]

0 commit comments

Comments
 (0)