kopia lustrzana https://github.com/martinlackner/apportionment
fix largest_remainder with fractions=False
rodzic
bacdfe0cfd
commit
549a7f0667
|
@ -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))
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue