diff --git a/mesa/space.py b/mesa/space.py index a1b9ff43c67..0820aee31ea 100644 --- a/mesa/space.py +++ b/mesa/space.py @@ -199,21 +199,6 @@ def coord_iter(self) -> Iterator[tuple[GridContent, int, int]]: for col in range(self.height): yield self._grid[row][col], row, col # agent, x, y - def neighbor_iter(self, pos: Coordinate, moore: bool = True) -> Iterator[Agent]: - """Iterate over position neighbors. - - Args: - pos: (x,y) coords tuple for the position to get the neighbors of. - moore: Boolean for whether to use Moore neighborhood (including - diagonals) or Von Neumann (only up/down/left/right). - """ - - warn( - "`neighbor_iter` is deprecated in favor of `iter_neighbors` " - "and will be removed in the subsequent version." - ) - return self.iter_neighbors(pos, moore) - def iter_neighborhood( self, pos: Coordinate, @@ -761,19 +746,6 @@ def get_neighborhood( return neighborhood - def neighbor_iter(self, pos: Coordinate) -> Iterator[Agent]: - """Iterate over position neighbors. - - Args: - pos: (x,y) coords tuple for the position to get the neighbors of. - """ - - warn( - "`neighbor_iter` is deprecated in favor of `iter_neighbors` " - "and will be removed in the subsequent version." - ) - return self.iter_neighbors(pos) - def iter_neighborhood( self, pos: Coordinate, include_center: bool = False, radius: int = 1 ) -> Iterator[Coordinate]: