Skip to content

Commit

Permalink
Select elements directly using ternary operator
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Fitzner <[email protected]>
  • Loading branch information
AdrianSosic and Scienfitz authored Nov 22, 2024
1 parent 6e1b787 commit 920123d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_candidate_toggling(constraints, exclude, complement):

# Extract row indices of candidates whose metadata should have been toggled
matches = campaign.searchspace.discrete.exp_rep["a"] == 0
idx = matches.index[~matches] if complement else matches.index[matches]
idx = matches.index[~matches if complement else matches]

# Assert that metadata is set correctly
target = campaign._searchspace_metadata.loc[idx, _EXCLUDED]
Expand Down

0 comments on commit 920123d

Please sign in to comment.