Skip to content

Commit

Permalink
make fractions=False default
Browse files Browse the repository at this point in the history
  • Loading branch information
martinlackner committed Feb 16, 2022
1 parent 59559b4 commit 0a1a742
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apportionment/methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def compute(
method,
votes,
seats,
fractions=True,
fractions=False,
parties=string.ascii_letters,
threshold=None,
tiesallowed=True,
Expand Down Expand Up @@ -117,7 +117,7 @@ def within_quota(votes, representatives, parties=string.ascii_letters, verbose=T

# Largest remainder method (Hamilton method)
def largest_remainder(
votes, seats, fractions=True, parties=string.ascii_letters, tiesallowed=True, verbose=True
votes, seats, fractions=False, parties=string.ascii_letters, tiesallowed=True, verbose=True
):
# votes = np.array(votes)
if verbose:
Expand Down Expand Up @@ -167,7 +167,7 @@ def largest_remainder(

# Divisor methods
def divisor(
votes, seats, method, fractions=True, parties=string.ascii_letters, tiesallowed=True, verbose=True
votes, seats, method, fractions=False, parties=string.ascii_letters, tiesallowed=True, verbose=True
):
votes = np.array(votes)
representatives = np.zeros(len(votes), dtype=int)
Expand Down Expand Up @@ -296,7 +296,7 @@ def __divzero_fewerseatsthanparties(votes, seats, parties, tiesallowed, verbose)
return representatives


def quota(votes, seats, fractions=True, parties=string.ascii_letters, tiesallowed=True, verbose=True):
def quota(votes, seats, fractions=False, parties=string.ascii_letters, tiesallowed=True, verbose=True):
"""The quota method
see Balinski, M. L., & Young, H. P. (1975).
The quota method of apportionment.
Expand Down

0 comments on commit 0a1a742

Please sign in to comment.