Skip to content

Commit

Permalink
Zach request
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed Jul 11, 2024
1 parent b7c4309 commit c1cb3d2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/spikeinterface/core/unitsaggregationsorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def __init__(self, sorting_list, renamed_unit_ids=None):
)
unit_ids = list(renamed_unit_ids)
else:
all_ids_are_same_type = np.unique([sort.get_unit_ids().dtype for sort in sorting_list]).size == 1
unit_ids_dtypes = [sort.get_unit_ids().dtype for sort in sorting_list]
all_ids_are_same_type = np.unique(unit_ids_dtypes).size == 1
all_units_ids_are_unique = False
if all_ids_are_same_type:
combined_ids = np.concatenate([sort.get_unit_ids() for sort in sorting_list])
Expand All @@ -44,7 +45,10 @@ def __init__(self, sorting_list, renamed_unit_ids=None):
unit_ids = combined_ids
else:
default_unit_ids = [str(i) for i in range(num_all_units)]
unit_ids = default_unit_ids
if all_ids_are_same_type and np.issubdtype(unit_ids_dtypes[0], np.integer):
unit_ids = np.arange(num_all_units, dtype=dtype)
else:
unit_ids = default_unit_ids

# unit map maps unit ids that are used to get spike trains
u_id = 0
Expand Down

0 comments on commit c1cb3d2

Please sign in to comment.