Skip to content

Commit

Permalink
scipy compatibility with getting function "ndim_coords_from_arrays"
Browse files Browse the repository at this point in the history
  • Loading branch information
johnh865 committed May 8, 2022
1 parent bd5befc commit 44ee7c2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
2 changes: 2 additions & 0 deletions docs/multiwinner/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ def multi_model(name, methods,
e.set_models(voters=v, candidates=c)
for method in methods:
e.run(etype=method)
return e




Expand Down
13 changes: 1 addition & 12 deletions votesim/models/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -1225,18 +1225,7 @@ def append_stat(self, d: metrics.BaseStats, name='', update_docs=False):
update_docs=update_docs)


def combine_elections(elections: list[Election]):
candidates = [e.candidates for e in elections]
candidates = Candidates.concat(candidates)
voters = candidates.voters
election_datas = [e.data for e in elections]
winners
ties
ballots
raise NotImplementedError()







Expand Down
6 changes: 4 additions & 2 deletions votesim/utilities/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
import scipy
from scipy.stats import truncnorm
from scipy.interpolate import NearestNDInterpolator
from scipy.interpolate.ndgriddata import _ndim_coords_from_arrays


try:
from scipy.interpolate.interpnd import _ndim_coords_from_arrays
except ImportError:
from scipy.interpolate.ndgriddata import _ndim_coords_from_arrays

def ltruncnorm(loc, scale, size, random_state=None):
"""
Expand Down

0 comments on commit 44ee7c2

Please sign in to comment.