Skip to content

Commit

Permalink
Fix bug in average_hamming_distance
Browse files Browse the repository at this point in the history
  • Loading branch information
vrettasm committed Feb 6, 2025
1 parent 2cc1441 commit c639175
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pygenalgo/engines/auxiliary.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from dataclasses import dataclass, field
from pygenalgo.genome.chromosome import Chromosome


# Public interface.
__all__ = ["hamming_distance", "average_hamming_distance",
"apply_corrections", "SubPopulation"]
Expand Down Expand Up @@ -61,7 +60,7 @@ def average_hamming_distance(population: list[Chromosome]) -> float:
total_diffs, total_genes = 0, 0

# Iterate through all the population.
for i, item1 in enumerate(population[:-1]):
for i, item1 in enumerate(population):

# Get the size of the chromosome. It is
# assumed that all chromosomes have the
Expand Down

0 comments on commit c639175

Please sign in to comment.