Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedfgad committed Nov 6, 2023
1 parent 20fc0f8 commit d17fe6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pygad/pygad.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ def __init__(self,
self.valid_parameters = False
raise ValueError(f"When mutation_type='adaptive', then the 'mutation_percent_genes' parameter must have only 2 elements but ({len(mutation_percent_genes)}) element(s) found.")
else:
if self.mutation_probability is None:
if self.mutation_percent_genes is None:
self.valid_parameters = False
raise TypeError(f"Unexpected type of the 'mutation_percent_genes' parameter. When mutation_type='adaptive', then the 'mutation_percent_genes' parameter should exist and assigned a list/tuple/numpy.ndarray with 2 values but ({mutation_percent_genes}) found.")
# The mutation_num_genes parameter exists. Checking whether adaptive mutation is used.
Expand Down

0 comments on commit d17fe6a

Please sign in to comment.