Skip to content

Commit

Permalink
Convert SNTV results to Python ints
Browse files Browse the repository at this point in the history
I'm not sure whether these should be Python ints or numpy ints for
speed, whether it should be a set or a tuple or list or array.  But this
fixes the doctest error at least.
  • Loading branch information
endolith committed Jul 5, 2024
1 parent 32b6ca2 commit 45eebe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elsim/methods/fptp.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,4 @@ def sntv(election, n=1, tiebreaker=None):
return set(untied_winners) | set(tie_winners)
else:
# TODO: Maybe should use arrays for deterministic randomness?
return set(top_candidates)
return set(int(candidate) for candidate in top_candidates)

0 comments on commit 45eebe7

Please sign in to comment.