Skip to content

Commit

Permalink
test: update plot2d for unbounded cost
Browse files Browse the repository at this point in the history
  • Loading branch information
BradyPlanden committed Oct 3, 2024
1 parent bbafc54 commit 929f72d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/unit/test_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,11 @@ def test_cost_plots(self, cost):
pybop.plot2d(cost, gradient=True, steps=5)

# Test without bounds
for param in cost.problem.parameters:
for param in cost.parameters:
param.bounds = None
with pytest.raises(ValueError):
pybop.plot2d(cost, steps=5)
pybop.plot2d(cost, steps=5)

# Test with bounds
pybop.plot2d(cost, bounds=np.array([[0.5, 0.8], [0.4, 0.7]]), steps=5)

@pytest.fixture
Expand Down

0 comments on commit 929f72d

Please sign in to comment.