From 0c5e9cc27766b59c3d9505266de4e3ace9cf60d6 Mon Sep 17 00:00:00 2001 From: Ewout ter Hoeven Date: Wed, 30 Oct 2024 11:25:30 +0100 Subject: [PATCH] Stabilize PropertyLayer Removes the warning that the PropertyLayer is experimental, and thus stabilize it. It has been used in example models, integrated into the visualisation (both standalone and as part of the cell space) and in Mesa for almost a year without needing API changes. Note that while the PropertyLayer itself is stable, not all it's integration might be, like the integration into the still experimental cell space. --- mesa/space.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/mesa/space.py b/mesa/space.py index df501b8639c..0f52f05de3b 100644 --- a/mesa/space.py +++ b/mesa/space.py @@ -607,8 +607,6 @@ class PropertyLayer: """ - propertylayer_experimental_warning_given = False - def __init__( self, name: str, width: int, height: int, default_value, dtype=np.float64 ): @@ -653,15 +651,6 @@ def __init__( self.data = np.full((width, height), default_value, dtype=dtype) - if not self.__class__.propertylayer_experimental_warning_given: - warnings.warn( - "The new PropertyLayer and _PropertyGrid classes experimental. It may be changed or removed in any and all future releases, including patch releases.\n" - "We would love to hear what you think about this new feature. If you have any thoughts, share them with us here: https://github.com/projectmesa/mesa/discussions/1932", - FutureWarning, - stacklevel=2, - ) - self.__class__.propertylayer_experimental_warning_given = True - def set_cell(self, position: Coordinate, value): """Update a single cell's value in-place.""" self.data[position] = value