Skip to content

Commit

Permalink
Merge pull request #3346 from zm711/curation-pot-merges
Browse files Browse the repository at this point in the history
Clean-up identity merges in `get_potential_auto_merges`
  • Loading branch information
alejoe91 authored Sep 5, 2024
2 parents fa50091 + b234713 commit a8853d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/spikeinterface/curation/auto_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,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)

Expand Down

0 comments on commit a8853d3

Please sign in to comment.