8000 Bug fix · madprog/GeneticAlgorithmPython@c4769bb · GitHub
[go: up one dir, main page]

Skip to content

Commit c4769bb

Browse files
committed
Bug fix
1 parent d17fe6a commit c4769bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pygad/pygad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ def __init__(self,
781781
self.valid_parameters = False
782782
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.")
783783
else:
784-
if self.mutation_percent_genes is None:
784+
if self.mutation_probability is None:
785785
self.valid_parameters = False
786786
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.")
787787
# The mutation_num_genes parameter exists. Checking whether adaptive mutation is used.

0 commit comments

Comments
 (0)
0