Skip to content

Commit

Permalink
TST: change an objective function in a differential evolution regress…
Browse files Browse the repository at this point in the history
…ion test
  • Loading branch information
alexbrc committed Feb 10, 2015
1 parent a51bdc2 commit 297fa7d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions scipy/optimize/tests/test__differential_evolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,14 +362,8 @@ def test_gh_4511_regression(self):
# uses a custom popsize that had triggered an off-by-one error.
# Because we do not care about solving the optimization problem in
# this test, we use maxiter=1 to reduce the testing time.

def ackley(x):
arg1 = -0.2 * np.sqrt(0.5 * (x[0] ** 2 + x[1] ** 2))
arg2 = 0.5 * (np.cos(2. * np.pi * x[0]) + np.cos(2. * np.pi * x[1]))
return -20. * np.exp(arg1) - np.exp(arg2) + 20. + np.e

bounds = [(-5, 5), (-5, 5)]
result = differential_evolution(ackley, bounds, popsize=1815, maxiter=1)
result = differential_evolution(rosen, bounds, popsize=1815, maxiter=1)


if __name__ == '__main__':
Expand Down

0 comments on commit 297fa7d

Please sign in to comment.