From 163e606a4d7b2098473837da43e611029c2cb955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Allain?= Date: Thu, 27 Apr 2023 10:25:03 +0200 Subject: [PATCH] FIX ensure copy when splitting signal (#114) --- alphacsc/utils/signal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alphacsc/utils/signal.py b/alphacsc/utils/signal.py index 81d80fc8..4aebcf1b 100644 --- a/alphacsc/utils/signal.py +++ b/alphacsc/utils/signal.py @@ -58,7 +58,7 @@ def split_signal(X, n_splits=1, apply_window=True): n_channels, n_times = X.shape n_times = n_times // n_splits - X_split = X[:, :n_splits * n_times] + X_split = X[:, :n_splits * n_times].copy() X_split = X_split.reshape(n_channels, n_splits, n_times).swapaxes(0, 1) # Apply a window to the signal to reduce the border artifacts