Skip to content

Commit

Permalink
update check for np array size
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelbray32 committed Feb 12, 2024
1 parent 6569210 commit a4fcffa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/spyglass/spikesorting/analysis/v1/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ def filter_units(
if isinstance(unit_labels, str):
unit_labels = [unit_labels]
if (
include_labels and np.all(~np.isin(unit_labels, include_labels))
include_labels.size > 0
and np.all(~np.isin(unit_labels, include_labels))
) or np.any(np.isin(unit_labels, exclude_labels)):
# if the unit does not have any of the include labels
# or has any of the exclude labels, skip
Expand Down

0 comments on commit a4fcffa

Please sign in to comment.