From 45eebe781e99e65b4384af3d2bdd80d244add2d1 Mon Sep 17 00:00:00 2001 From: endolith Date: Fri, 5 Jul 2024 13:59:34 -0400 Subject: [PATCH] Convert SNTV results to Python ints 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. --- elsim/methods/fptp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elsim/methods/fptp.py b/elsim/methods/fptp.py index 5dc9aa0..961c19b 100644 --- a/elsim/methods/fptp.py +++ b/elsim/methods/fptp.py @@ -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)