Skip to content

Commit eaa5872

Browse files
committed
Name experimental warning in PropertyLayer correctly
The experimental_warning_given variable in PropertyLayer was named incorrectly, probably while copying from the AgentSet. This commit fixes that.
1 parent 67c4a28 commit eaa5872

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mesa/space.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ class PropertyLayer:
586586
aggregate_property(operation): Performs an aggregate operation over all cells.
587587
"""
588588

589-
agentset_experimental_warning_given = False
589+
propertylayer_experimental_warning_given = False
590590

591591
def __init__(
592592
self, name: str, width: int, height: int, default_value, dtype=np.float64
@@ -633,14 +633,14 @@ def __init__(
633633

634634
self.data = np.full((width, height), default_value, dtype=dtype)
635635

636-
if not self.__class__.agentset_experimental_warning_given:
636+
if not self.__class__.propertylayer_experimental_warning_given:
637637
warnings.warn(
638638
"The new PropertyLayer and _PropertyGrid classes experimental. It may be changed or removed in any and all future releases, including patch releases.\n"
639639
"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",
640640
FutureWarning,
641641
stacklevel=2,
642642
)
643-
self.__class__.agentset_experimental_warning_given = True
643+
self.__class__.propertylayer_experimental_warning_given = True
644644

645645
def set_cell(self, position: Coordinate, value):
646646
"""

0 commit comments

Comments
 (0)