Skip to content

Commit 6deceaa

Browse files
Fix type issues
1 parent 8dfc1a2 commit 6deceaa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

genetic_algorithm/knapsack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ def run_ga(
266266
"""
267267
population = [random_genome(len(items)) for _ in range(pop_size)]
268268
best_fitness_history: list[int] = [] # track best fitness per generation
269-
avg_fitness_history: list[int] = []
269+
avg_fitness_history: list[float] = []
270270
best_genome_overall: genome_t = []
271271
best_fitness_overall: int = -1
272272

0 commit comments

Comments
 (0)