Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
yger committed Aug 30, 2023
1 parent 3817ee0 commit 6f902d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/spikeinterface/preprocessing/silence_periods.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def __init__(self, recording, list_periods, mode="zeros", **random_chunk_kwargs)
num_seg = recording.get_num_segments()

if num_seg == 1:
if isinstance(list_periods, (list, np.ndarray)) and not np.isscalar(list_periods[0]):
if isinstance(list_periods, (list, np.ndarray)) and np.array(list_periods).ndim == 2:
# when unique segment accept list instead of of list of list/arrays
list_periods = [list_periods]

Expand Down

0 comments on commit 6f902d4

Please sign in to comment.