We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2510727 commit 06ed09dCopy full SHA for 06ed09d
docs/source/README_pygad_ReadTheDocs.rst
@@ -2261,7 +2261,7 @@ gene's value.
2261
def mutation_func(offspring, ga_instance):
2262
2263
for chromosome_idx in range(offspring.shape[0]):
2264
- random_gene_idx = numpy.random.choice(range(offspring.shape[0]))
+ random_gene_idx = numpy.random.choice(range(offspring.shape[1]))
2265
2266
offspring[chromosome_idx, random_gene_idx] += numpy.random.random()
2267
0 commit comments