Skip to content

Commit

Permalink
Merge pull request #285 from madprog/fix_example_custom_operators
Browse files Browse the repository at this point in the history
Fix a typo in example_custom_operators
  • Loading branch information
ahmedfgad authored Apr 14, 2024
2 parents 8024132 + f98f0c9 commit 272aaa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/example_custom_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def crossover_func(parents, offspring_size, ga_instance):
parent1 = parents[idx % parents.shape[0], :].copy()
parent2 = parents[(idx + 1) % parents.shape[0], :].copy()

random_split_point = numpy.random.choice(range(offspring_size[0]))
random_split_point = numpy.random.choice(range(offspring_size[1]))

parent1[random_split_point:] = parent2[random_split_point:]

Expand Down

0 comments on commit 272aaa5

Please sign in to comment.