Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 3, 2025
1 parent f549eee commit 4b3bb91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions mesa/experimental/continuous_space/continuous_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion mesa/visualization/mpl_space_drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,4 +592,4 @@ def _scatter(ax: Axes, arguments, **kwargs):
zorder=z_order,
**{k: v[logical] for k, v in arguments.items()},
**kwargs,
)
)

0 comments on commit 4b3bb91

Please sign in to comment.