Skip to content

Commit

Permalink
last fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorfrois committed Sep 23, 2024
1 parent 44a3ed5 commit 7d75683
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/ising/ising/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(

def step(self):
agents_list = list(self.agents)
self._steps += 1000
self.steps += 1000
for i in range(1000):
random_spin = self.random.choice(agents_list)
dE = self.get_energy_change(random_spin)
Expand Down
2 changes: 1 addition & 1 deletion examples/ising/ising/spin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ def __init__(self, pos, model, init_state):
self.state = init_state

def neighbors(self):
return self.model.grid.iter_neighbors((self.x, self.y), True)
return self.model.grid.iter_neighbors((self.x, self.y), moore=True)

0 comments on commit 7d75683

Please sign in to comment.