Skip to content

Commit

Permalink
hotfix for partial reporting bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jjcherian committed Nov 6, 2024
1 parent ebc3a40 commit 7bd96a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/elexmodel/models/BootstrapElectionModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,10 @@ def _generate_nonreporting_bounds(

# if percent reporting is 0 or 1, don't try to compute anything and revert to naive bounds
lower_bound[
np.isclose(nonreporting_expected_vote_frac, 0) | np.isclose(nonreporting_expected_vote_frac, 1)
(nonreporting_expected_vote_frac < 0.5) | np.isclose(nonreporting_expected_vote_frac, 1)
] = unobserved_lower_bound
upper_bound[
np.isclose(nonreporting_expected_vote_frac, 0) | np.isclose(nonreporting_expected_vote_frac, 1)
(nonreporting_expected_vote_frac < 0.5) | np.isclose(nonreporting_expected_vote_frac, 1)
] = unobserved_upper_bound

return lower_bound.values.reshape(-1, 1), upper_bound.values.reshape(-1, 1)
Expand Down

0 comments on commit 7bd96a0

Please sign in to comment.