Skip to content

Commit

Permalink
fix: 🐛 move intialization of self.cells property into the private m…
Browse files Browse the repository at this point in the history
…ethod
  • Loading branch information
SongshGeo authored and wang-boyu committed Feb 2, 2025
1 parent 011e9da commit 51d4e57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mesa_geo/raster_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,12 @@ def __init__(
super().__init__(width, height, crs, total_bounds)
self.model = model
self.cell_cls = cell_cls
self.cells = []
self._initialize_cells(model, cell_cls)
self._attributes = set()
self._neighborhood_cache = {}

def _initialize_cells(self, model: Model, cell_cls: type[Cell]):
self.cells = []
for x in range(self.width):
col: list[cell_cls] = []
for y in range(self.height):
Expand Down

0 comments on commit 51d4e57

Please sign in to comment.