fix largest_remainder with fractions=False

master
Martin Lackner 2022-02-16 14:38:22 +01:00
rodzic bacdfe0cfd
commit 549a7f0667
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -130,6 +130,7 @@ def largest_remainder(
quotas = [Fraction(int(p), q) for p in votes]
representatives = np.array([int(qu.numerator // qu.denominator) for qu in quotas])
else:
votes = np.array(votes)
quotas = (votes * seats) / np.sum(votes)
representatives = np.int_(np.trunc(quotas))