-
-
Notifications
You must be signed in to change notification settings - Fork 212
Open
Description
Problem
Three GIS example models in Mesa-examples are failing due to breaking changes introduced in mesa/mesa-geo#299, which added new keyword arguments (rowcol, xy) to the Cell.__init__() method.
Failing models:
gis/urban_growth-UrbanCellgis/rainfall-LakeCellgis/population-UgandaCell
Error:
TypeError: <CustomCell>.__init__() got an unexpected keyword argument 'rowcol'
Root cause
The updated Cell.__init__() in mesa-geo now accepts keyword-only arguments rowcol and xy:
def __init__(self, model, pos=None, indices=None, *, rowcol=None, xy=None):Custom Cell subclasses in the example models don't accept these arguments, causing instantiation to fail when RasterLayer._initialize_cells() tries to create cells.
Additional considerations
While fixing the signatures, we might update the models to use the new cell.rowcol property instead of the deprecated cell.indices where applicable.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels