Skip to content

Commit

Permalink
Add error message for negative scores
Browse files Browse the repository at this point in the history
  • Loading branch information
endolith committed Jul 20, 2023
1 parent 7ab9333 commit d903ee0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elsim/methods/star.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def star(election, tiebreaker=None):
election = np.asarray(election)

if election.min() < 0:
raise ValueError
raise ValueError('Scores cannot be negative')

if election.shape[1] == 1:
# Only 1 candidate: that candidate wins.
Expand Down

0 comments on commit d903ee0

Please sign in to comment.