Skip to content

Commit 97ab230

Browse files
fix issue #740 (#742)
1 parent 64e7813 commit 97ab230

File tree

1 file changed

+2
-3
lines changed
  • pymoo/operators/crossover

1 file changed

+2
-3
lines changed

pymoo/operators/crossover/nox.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33

44

55
class NoCrossover(Crossover):
6-
7-
def __init__(self):
8-
super().__init__(1, 1, 0.0)
6+
def __init__(self, *, n_parents=1, n_offsprings=1, prob=0.0, **kwargs):
7+
super().__init__(n_parents, n_offsprings, prob, **kwargs)
98

109
def do(self, problem, pop, *args, random_state, **kwargs):
1110
return Population.create(*[random_state.choice(parents) for parents in pop])

0 commit comments

Comments
 (0)