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 64e7813 commit 97ab230Copy full SHA for 97ab230
pymoo/operators/crossover/nox.py
@@ -3,9 +3,8 @@
3
4
5
class NoCrossover(Crossover):
6
-
7
- def __init__(self):
8
- super().__init__(1, 1, 0.0)
+ def __init__(self, *, n_parents=1, n_offsprings=1, prob=0.0, **kwargs):
+ super().__init__(n_parents, n_offsprings, prob, **kwargs)
9
10
def do(self, problem, pop, *args, random_state, **kwargs):
11
return Population.create(*[random_state.choice(parents) for parents in pop])
0 commit comments