Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Dec 18, 2024
1 parent f083330 commit 0224762
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/unit/test_optimisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,11 @@ def test_cuckoo_no_bounds(self, cost):
@pytest.mark.unit
def test_randomsearch_bounds(self, two_param_cost):
# Initialize RandomSearch with boundaries
bounds = {"upper": [0.62,0.57], "lower": [0.58,0.53]}
bounds = {"upper": [0.62, 0.57], "lower": [0.58, 0.53]}

optimiser = pybop.RandomSearch(cost=two_param_cost, bounds=bounds, max_iterations=1)
optimiser = pybop.RandomSearch(
cost=two_param_cost, bounds=bounds, max_iterations=1
)

# Define candidates outside boundaries
candidates = np.array([[0.57, 0.52], [0.63, 0.58]])
Expand All @@ -358,7 +360,9 @@ def test_randomsearch_bounds(self, two_param_cost):
assert np.allclose(clipped_candidates, expected_clipped)

# Initialize optimiser without boundaries
optimiser = pybop.RandomSearch(cost=two_param_cost, bounds=None, max_iterations=1)
optimiser = pybop.RandomSearch(
cost=two_param_cost, bounds=None, max_iterations=1
)

# Define candidates outside typical boundaries
candidates = np.array([[0.57, 0.52], [0.63, 0.58]])
Expand Down

0 comments on commit 0224762

Please sign in to comment.