Skip to content

Commit 2162451

Browse files
authored
Fix two more cases of a missing super().__init__() in the model init (#89)
* boltzmann_wealth_model_experimental: Add super().__init__() One more case of super().__init__() * Another super().__init__()
1 parent fc13cf9 commit 2162451

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

examples/boltzmann_wealth_model_experimental/model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class BoltzmannWealthModel(mesa.Model):
1818
"""
1919

2020
def __init__(self, N=100, width=10, height=10):
21+
super().__init__()
2122
self.num_agents = N
2223
self.grid = mesa.space.MultiGrid(width, height, True)
2324
self.schedule = mesa.time.RandomActivation(self)

examples/caching_and_replay/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class Schelling(mesa.Model):
4141

4242
def __init__(self, width=20, height=20, density=0.8, minority_pc=0.2, homophily=3):
4343
""" """
44-
44+
super().__init__()
4545
self.width = width
4646
self.height = height
4747
self.density = density

0 commit comments

Comments
 (0)