Skip to content

Commit

Permalink
Retrieve x0 from SciPyDE
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolaCourtier committed Jul 3, 2024
1 parent 1331a8f commit d6120c8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/unit/test_standalone.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def test_optimisation_on_standalone_cost(self):
optim = pybop.SciPyDifferentialEvolution(cost=cost)
x, final_cost = optim.run()

optim.x0 = optim.log["x"][0][0]
initial_cost = optim.cost(optim.x0)
assert initial_cost > final_cost
np.testing.assert_allclose(final_cost, 42, atol=1e-1)
Expand Down

0 comments on commit d6120c8

Please sign in to comment.