From b1b6c228a1ea4d28a76c5f82d354a7172bba8958 Mon Sep 17 00:00:00 2001 From: zm711 <92116279+zm711@users.noreply.github.com> Date: Wed, 28 Aug 2024 11:32:34 -0400 Subject: [PATCH] clean-up identity merges --- src/spikeinterface/curation/auto_merge.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/spikeinterface/curation/auto_merge.py b/src/spikeinterface/curation/auto_merge.py index 920d6713ad..4cbe3958f2 100644 --- a/src/spikeinterface/curation/auto_merge.py +++ b/src/spikeinterface/curation/auto_merge.py @@ -361,6 +361,9 @@ def get_potential_auto_merge( ind1, ind2 = np.nonzero(pair_mask) potential_merges = list(zip(unit_ids[ind1], unit_ids[ind2])) + # some methods return identities ie (1,1) which we can cleanup first. + potential_merges = [(ids[0], ids[1]) for ids in potential_merges if ids[0] != ids[1]] + if resolve_graph: potential_merges = resolve_merging_graph(sorting, potential_merges)