From d57ff373345fea1bdfd5f23c752e468b909b4744 Mon Sep 17 00:00:00 2001 From: "Patrick J. Roddy" Date: Tue, 18 Jun 2024 12:34:22 +0100 Subject: [PATCH] Fix linting (#392) --- src/sleplet/plot_methods.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sleplet/plot_methods.py b/src/sleplet/plot_methods.py index 661f7927..1ee68ac9 100644 --- a/src/sleplet/plot_methods.py +++ b/src/sleplet/plot_methods.py @@ -174,7 +174,7 @@ def _normalise_function( # if all 0, set to 0 return f + 0.5 # if all non-zero, set to 1 otherwise scale from [0, 1] - return f / f.max() if np.allclose(f, f.max()) else (f - f.min()) / f.ptp() + return f / f.max() if np.allclose(f, f.max()) else (f - f.min()) / np.ptp(f) def _boost_field( # noqa: PLR0913