Skip to content

Commit

Permalink
use set instead of np.unique
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin committed Dec 19, 2024
1 parent a58436a commit 366bc8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/neuroconv/tools/spikeinterface/spikeinterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ def _get_group_name(recording: BaseRecording) -> np.ndarray:

# Validate group names against groups
if groups is not None:
unique_groups = np.unique(groups)
unique_names = np.unique(group_names)
unique_groups = set(groups)
unique_names = set(group_names)

if len(unique_names) != len(unique_groups):
raise ValueError("The number of group names must match the number of groups")
Expand Down

0 comments on commit 366bc8f

Please sign in to comment.