Skip to content

Commit

Permalink
Print summed scores with higher precision
Browse files Browse the repository at this point in the history
  • Loading branch information
endolith committed Jun 4, 2023
1 parent 17e9419 commit c25ffec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions starpy/Allocated_Score.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ def Allocated_Score(K, W, S):
weighted_scores = ballots.multiply(ballot_weight, axis="index")

#Select winner
w = weighted_scores.sum().idxmax()
#print('winner',w)
weighted_sums = weighted_scores.sum()
#print(f'\nWeighted scores:\n{weighted_sums.map("{:.20f}".format)}')
w = weighted_sums.idxmax()
#print(f'\nWinner: {w}')

#Add winner to list
winner_list.append(w)
Expand Down

0 comments on commit c25ffec

Please sign in to comment.