Skip to content

Commit

Permalink
use cache in neighbor funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
Corvince committed Feb 5, 2021
1 parent cccd438 commit 674cd14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mesa/space.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def neighbor_iter(
diagonals) or Von Neumann (only up/down/left/right).
"""
neighborhood = self.iter_neighborhood(pos, moore=moore)
neighborhood = self.get_neighborhood(pos, moore=moore)
return self.iter_cell_list_contents(neighborhood)

def iter_neighborhood(
Expand Down Expand Up @@ -249,7 +249,7 @@ def iter_neighbors(
(8 and 4 if not including the center).
"""
neighborhood = self.iter_neighborhood(pos, moore, include_center, radius)
neighborhood = self.get_neighborhood(pos, moore, include_center, radius)
return self.iter_cell_list_contents(neighborhood)

def get_neighbors(
Expand Down

0 comments on commit 674cd14

Please sign in to comment.