Skip to content

Commit 8fecaad

Browse files
authored
Merge pull request #103 from philtweir/patch-1
Minor typo
2 parents 98123a7 + 04bf26f commit 8fecaad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pygad.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def __init__(self,
260260
if initial_population is None:
261261
if (sol_per_pop is None) or (num_genes is None):
262262
self.valid_parameters = False
263-
raise ValueError("Error creating the initail population\n\nWhen the parameter initial_population is None, then neither of the 2 parameters sol_per_pop and num_genes can be None at the same time.\nThere are 2 options to prepare the initial population:\n1) Create an initial population and assign it to the initial_population parameter. In this case, the values of the 2 parameters sol_per_pop and num_genes will be deduced.\n2) Allow the genetic algorithm to create the initial population automatically by passing valid integer values to the sol_per_pop and num_genes parameters.")
263+
raise ValueError("Error creating the initial population\n\nWhen the parameter initial_population is None, then neither of the 2 parameters sol_per_pop and num_genes can be None at the same time.\nThere are 2 options to prepare the initial population:\n1) Create an initial population and assign it to the initial_population parameter. In this case, the values of the 2 parameters sol_per_pop and num_genes will be deduced.\n2) Allow the genetic algorithm to create the initial population automatically by passing valid integer values to the sol_per_pop and num_genes parameters.")
264264
elif (type(sol_per_pop) is int) and (type(num_genes) is int):
265265
# Validating the number of solutions in the population (sol_per_pop)
266266
if sol_per_pop <= 0:

0 commit comments

Comments
 (0)