From 0e540b6b7c50aa3aef84e9db8813e82fd4849a92 Mon Sep 17 00:00:00 2001 From: Matej Straka Date: Wed, 4 Dec 2024 16:18:13 +0100 Subject: [PATCH] fix: Channels dont change type from bool to int --- generals/core/channels.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generals/core/channels.py b/generals/core/channels.py index 70d9857..295489d 100644 --- a/generals/core/channels.py +++ b/generals/core/channels.py @@ -37,7 +37,7 @@ def __init__(self, grid: np.ndarray, _agents: list[str]): def get_visibility(self, agent_id: str) -> np.ndarray: channel = self._ownership[agent_id] - return maximum_filter(channel, size=3) + return maximum_filter(channel, size=3).astype(bool) @staticmethod def channel_to_indices(channel: np.ndarray) -> np.ndarray: