Skip to content

Commit d5dac0c

Browse files
authored
Merge pull request #253 from rsomers1998/master
Fixing typos in logging + docs
2 parents e54e5e8 + 19e13e8 commit d5dac0c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

docs/source/pygad_more.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ After running the code again, it will find the same result.
595595
[ 2.77249188 -4.06570662 0.04196872 -3.47770796 -0.57502138 -3.22775267]
596596
0.04872203136549972
597597
598-
Continue without Loosing Progress
598+
Continue without Losing Progress
599599
=================================
600600

601601
In `PyGAD
@@ -615,7 +615,7 @@ call to the ``run()`` method.
615615
4. ``self.solutions_fitness``
616616

617617
This helps the user to continue where the last run stopped without
618-
loosing the values of these 4 attributes.
618+
losing the values of these 4 attributes.
619619

620620
Now, the user can save the model by calling the ``save()`` method.
621621

docs/source/releases.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1020,8 +1020,8 @@ Release Date: 9 September 2022
10201020
generation. Another advantage happens when the instance is loaded and
10211021
the ``run()`` method is called, as the old fitness value are shown on
10221022
the graph alongside with the new fitness values. Read more in this
1023-
section: `Continue without Loosing
1024-
Progress <https://pygad.readthedocs.io/en/latest/pygad_more.html#continue-without-loosing-progress>`__
1023+
section: `Continue without Losing
1024+
Progress <https://pygad.readthedocs.io/en/latest/pygad_more.html#continue-without-losing-progress>`__
10251025

10261026
4. Thanks `Prof. Fernando Jiménez
10271027
Barrionuevo <http://webs.um.es/fernan>`__ (Dept. of Information and

pygad/pygad.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ def __init__(self,
726726
if self.mutation_probability is None:
727727
if not self.suppress_warnings:
728728
warnings.warn(
729-
f"The percentage of genes to mutate (mutation_percent_genes={mutation_percent_genes}) resutled in selecting ({mutation_num_genes}) genes. The number of genes to mutate is set to 1 (mutation_num_genes=1).\nIf you do not want to mutate any gene, please set mutation_type=None.")
729+
f"The percentage of genes to mutate (mutation_percent_genes={mutation_percent_genes}) resulted in selecting ({mutation_num_genes}) genes. The number of genes to mutate is set to 1 (mutation_num_genes=1).\nIf you do not want to mutate any gene, please set mutation_type=None.")
730730
mutation_num_genes = 1
731731

732732
elif type(mutation_percent_genes) in GA.supported_int_float_types:
@@ -745,7 +745,7 @@ def __init__(self,
745745
if mutation_num_genes == 0:
746746
if self.mutation_probability is None:
747747
if not self.suppress_warnings:
748-
warnings.warn(f"The percentage of genes to mutate (mutation_percent_genes={mutation_percent_genes}) resutled in selecting ({mutation_num_genes}) genes. The number of genes to mutate is set to 1 (mutation_num_genes=1).\nIf you do not want to mutate any gene, please set mutation_type=None.")
748+
warnings.warn(f"The percentage of genes to mutate (mutation_percent_genes={mutation_percent_genes}) resulted in selecting ({mutation_num_genes}) genes. The number of genes to mutate is set to 1 (mutation_num_genes=1).\nIf you do not want to mutate any gene, please set mutation_type=None.")
749749
mutation_num_genes = 1
750750
else:
751751
self.valid_parameters = False
@@ -771,7 +771,7 @@ def __init__(self,
771771
# Based on the mutation percentage of genes, if the number of selected genes for mutation is less than the least possible value which is 1, then the number will be set to 1.
772772
if mutation_num_genes[idx] == 0:
773773
if not self.suppress_warnings:
774-
warnings.warn(f"The percentage of genes to mutate ({mutation_percent_genes[idx]}) resutled in selecting ({mutation_num_genes[idx]}) genes. The number of genes to mutate is set to 1 (mutation_num_genes=1).\nIf you do not want to mutate any gene, please set mutation_type=None.")
774+
warnings.warn(f"The percentage of genes to mutate ({mutation_percent_genes[idx]}) resulted in selecting ({mutation_num_genes[idx]}) genes. The number of genes to mutate is set to 1 (mutation_num_genes=1).\nIf you do not want to mutate any gene, please set mutation_type=None.")
775775
mutation_num_genes[idx] = 1
776776
if mutation_percent_genes[0] < mutation_percent_genes[1]:
777777
if not self.suppress_warnings:

0 commit comments

Comments
 (0)