From 0293e7bc655c145af26051d9b84c2f31ff119032 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 7 Jun 2024 08:01:09 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- mne/_fiff/tests/test_reference.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mne/_fiff/tests/test_reference.py b/mne/_fiff/tests/test_reference.py index a207e8cde6d..fceccc8efc7 100644 --- a/mne/_fiff/tests/test_reference.py +++ b/mne/_fiff/tests/test_reference.py @@ -464,9 +464,11 @@ def test_set_eeg_reference_dict(ref_channels, expectation): for val in ref_channels.values(): if isinstance(val, str): val = [val] # pick_channels expects a list - ref_data.append(_data[..., pick_channels(raw.ch_names, val, ordered=True), :].mean( + ref_data.append( + _data[..., pick_channels(raw.ch_names, val, ordered=True), :].mean( -2, keepdims=True - )) + ) + ) ref_data = np.squeeze(np.array(ref_data)) assert_allclose( _data[ch_reref, :], _reref[ch_reref, :] + ref_data, 1e-6, atol=1e-15