Skip to content

Commit

Permalink
Add optional contrived candidate at exact center
Browse files Browse the repository at this point in the history
of each election
  • Loading branch information
endolith committed Aug 6, 2024
1 parent 4f65677 commit 849bf42
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/distributions_by_method_2D.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ def simulate_batch(n_cands):
for iteration in range(batch_size):
v, c = normal_electorate(n_voters, n_cands, dims=dims, disp=disp)

# Contrived candidate at exact center
# c[0] = 0, 0

if cand_dist == 'uniform':
# Replace with uniform distribution of candidates of same shape
v = np.random.uniform(-u_width/2, +u_width/2, n_voters)
Expand Down

0 comments on commit 849bf42

Please sign in to comment.