Skip to content

Commit 6abc551

Browse files
andyfafftylerjereddy
authored andcommitted
BUG: diffev exponential crossover
1 parent 9bb12cd commit 6abc551

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scipy/optimize/_differentialevolution.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,6 +1497,7 @@ def _mutate(self, candidate):
14971497
i = 0
14981498
crossovers = rng.uniform(size=self.parameter_count)
14991499
crossovers = crossovers < self.cross_over_probability
1500+
crossovers[0] = True
15001501
while (i < self.parameter_count and crossovers[i]):
15011502
trial[fill_point] = bprime[fill_point]
15021503
fill_point = (fill_point + 1) % self.parameter_count

0 commit comments

Comments
 (0)