From 04bf26fe162b3efb3f3473803c9012c5fda0b651 Mon Sep 17 00:00:00 2001 From: P T Weir Date: Mon, 25 Apr 2022 18:13:50 +0100 Subject: [PATCH] Minor typo Initail -> Initial --- pygad.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygad.py b/pygad.py index 1ba9d25..284c841 100644 --- a/pygad.py +++ b/pygad.py @@ -260,7 +260,7 @@ def __init__(self, if initial_population is None: if (sol_per_pop is None) or (num_genes is None): self.valid_parameters = False - 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.") + 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.") elif (type(sol_per_pop) is int) and (type(num_genes) is int): # Validating the number of solutions in the population (sol_per_pop) if sol_per_pop <= 0: