Skip to content

Commit b1b6c22

Browse files
committed
clean-up identity merges
1 parent 007b6ef commit b1b6c22

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/spikeinterface/curation/auto_merge.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,9 @@ def get_potential_auto_merge(
361361
ind1, ind2 = np.nonzero(pair_mask)
362362
potential_merges = list(zip(unit_ids[ind1], unit_ids[ind2]))
363363

364+
# some methods return identities ie (1,1) which we can cleanup first.
365+
potential_merges = [(ids[0], ids[1]) for ids in potential_merges if ids[0] != ids[1]]
366+
364367
if resolve_graph:
365368
potential_merges = resolve_merging_graph(sorting, potential_merges)
366369

0 commit comments

Comments
 (0)