Skip to content

Commit

Permalink
Fix parameter order in initializing SingleGrid object
Browse files Browse the repository at this point in the history
Parameter order should be width, height, torus according to https://mesa.readthedocs.io/en/master/apis/space.html
  • Loading branch information
Mat-pa authored Nov 17, 2019
1 parent 8e5b361 commit 0893a8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/schelling/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(self, height=20, width=20, density=0.8, minority_pc=0.2, homophily=
self.homophily = homophily

self.schedule = RandomActivation(self)
self.grid = SingleGrid(height, width, torus=True)
self.grid = SingleGrid(width, height, torus=True)

self.happy = 0
self.datacollector = DataCollector(
Expand Down

0 comments on commit 0893a8f

Please sign in to comment.