From 938725075b9dd395012f39f1cc1dbee0685f6d41 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 01:34:29 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- pycrostates/cluster/_base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pycrostates/cluster/_base.py b/pycrostates/cluster/_base.py index 26018865..664401dd 100644 --- a/pycrostates/cluster/_base.py +++ b/pycrostates/cluster/_base.py @@ -953,7 +953,9 @@ def _segment( half_window_size: int, ) -> NDArray[int]: """Create segmentation. Must operate on a copy of states.""" - corr = _correlation(states.T, data, ignore_polarity=ignore_polarity)[:len(states), :] + corr = _correlation(states.T, data, ignore_polarity=ignore_polarity)[ + : len(states), : + ] if ignore_polarity: corr = np.abs(corr) labels = np.argmax(corr, axis=0)