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