From 4b3bb91ee681ccfb5003ec076667e33c197109b9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 3 Jan 2025 08:56:10 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- mesa/experimental/continuous_space/continuous_space.py | 4 +--- mesa/visualization/mpl_space_drawing.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mesa/experimental/continuous_space/continuous_space.py b/mesa/experimental/continuous_space/continuous_space.py index c3ee6e7c771..8a3e70b3ca9 100644 --- a/mesa/experimental/continuous_space/continuous_space.py +++ b/mesa/experimental/continuous_space/continuous_space.py @@ -145,9 +145,7 @@ def calculate_distances(self, point, indices=None) -> tuple[np.ndarray, np.ndarr delta = point[np.newaxis, :] - positions delta = np.abs(delta, out=delta) - delta = np.minimum( - delta, self.size - delta, out=delta - ) + delta = np.minimum(delta, self.size - delta, out=delta) dists = np.linalg.norm(delta, axis=1) else: diff --git a/mesa/visualization/mpl_space_drawing.py b/mesa/visualization/mpl_space_drawing.py index 2bfae564036..784d370eba0 100644 --- a/mesa/visualization/mpl_space_drawing.py +++ b/mesa/visualization/mpl_space_drawing.py @@ -592,4 +592,4 @@ def _scatter(ax: Axes, arguments, **kwargs): zorder=z_order, **{k: v[logical] for k, v in arguments.items()}, **kwargs, - ) \ No newline at end of file + )