From df44a0a88bb446533e7def1a3841c77103326430 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 26 Jun 2024 19:16:26 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/spikeinterface/core/sorting_tools.py | 3 +-- src/spikeinterface/core/tests/test_sortinganalyzer.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/spikeinterface/core/sorting_tools.py b/src/spikeinterface/core/sorting_tools.py index a2301de86c..bb2ffc27b8 100644 --- a/src/spikeinterface/core/sorting_tools.py +++ b/src/spikeinterface/core/sorting_tools.py @@ -5,7 +5,6 @@ from spikeinterface.core import NumpySorting - def spike_vector_to_spike_trains(spike_vector: list[np.array], unit_ids: np.array) -> dict[dict[str, np.array]]: """ Computes all spike trains for all units/segments from a spike vector list. @@ -267,7 +266,7 @@ def apply_merges_to_sorting(sorting, units_to_merge, new_unit_ids=None, censor_m spikes = sorting.to_spike_vector().copy() to_keep = np.ones(len(spikes), dtype=bool) - + new_unit_ids = get_new_unit_ids_for_merges(sorting, units_to_merge, new_unit_ids) all_unit_ids = get_ids_after_merging(sorting, units_to_merge, new_unit_ids) diff --git a/src/spikeinterface/core/tests/test_sortinganalyzer.py b/src/spikeinterface/core/tests/test_sortinganalyzer.py index d2e89e9760..00f1166b68 100644 --- a/src/spikeinterface/core/tests/test_sortinganalyzer.py +++ b/src/spikeinterface/core/tests/test_sortinganalyzer.py @@ -244,7 +244,7 @@ def _check_sorting_analyzers(sorting_analyzer, original_sorting, cache_folder): else: folder = None sorting_analyzer4 = sorting_analyzer.merge_units( - units_to_merge=[[0, 1]], new_unit_ids=[50], format=format, folder=folder, mode='hard' + units_to_merge=[[0, 1]], new_unit_ids=[50], format=format, folder=folder, mode="hard" ) # test compute with extension-specific params