Skip to content

Commit

Permalink
fixed a > and >= in masking decision / added to test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
tgalvin committed Jun 21, 2024
1 parent 263b261 commit 5899bc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion flint/masking.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def consider_beam_mask_round(

return mask_rounds is not None and (
(isinstance(mask_rounds, str) and mask_rounds.lower() == "all")
or (isinstance(mask_rounds, int) and current_round > mask_rounds)
or (isinstance(mask_rounds, int) and current_round >= mask_rounds)
or (isinstance(mask_rounds, Iterable) and current_round in mask_rounds) # type: ignore
)

Expand Down
1 change: 1 addition & 0 deletions tests/test_masking.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def test_consider_beam_masking_round():
assert consider_beam_mask_round(
current_round=3, mask_rounds=1, allow_beam_masks=True
)
assert consider_beam_mask_round(current_round=1, mask_rounds=1)


def test_minimum_boxcar_artefact():
Expand Down

0 comments on commit 5899bc3

Please sign in to comment.