Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc9de4ea

Browse files
authored
Merge pull requestahmedfgad#94 from augustodamasceno/fix_warning_message_word
Fix a single word from `resutled` to `resulted` in the warning message returned when `self.mutation_probability is None`.
2 parents76bb230 +3103fc1 commitc9de4ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎pygad.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ def __init__(self,
466466
# 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.
467467
ifmutation_num_genes==0:
468468
ifself.mutation_probabilityisNone:
469-
ifnotself.suppress_warnings:warnings.warn("The percentage of genes to mutate (mutation_percent_genes={mutation_percent})resutled in selecting ({mutation_num}) 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.".format(mutation_percent=mutation_percent_genes,mutation_num=mutation_num_genes))
469+
ifnotself.suppress_warnings:warnings.warn("The percentage of genes to mutate (mutation_percent_genes={mutation_percent})resulted in selecting ({mutation_num}) 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.".format(mutation_percent=mutation_percent_genes,mutation_num=mutation_num_genes))
470470
mutation_num_genes=1
471471

472472
eliftype(mutation_percent_genes)inGA.supported_int_float_types:
@@ -3488,4 +3488,4 @@ def load(filename):
34883488
raiseFileNotFoundError("Error reading the file {filename}. Please check your inputs.".format(filename=filename))
34893489
except:
34903490
raiseBaseException("Error loading the file. If the file already exists, please reload all the functions previously used (e.g. fitness function).")
3491-
returnga_in
3491+
returnga_in

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp