From d903ee076a77191c676b1f5807c832d360c0eef0 Mon Sep 17 00:00:00 2001 From: endolith Date: Thu, 20 Jul 2023 18:39:08 -0400 Subject: [PATCH] Add error message for negative scores --- elsim/methods/star.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elsim/methods/star.py b/elsim/methods/star.py index 3e64d37..048f84b 100644 --- a/elsim/methods/star.py +++ b/elsim/methods/star.py @@ -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.