Skip to content

Commit

Permalink
Merge pull request #1946 from yger/patch_silence
Browse files Browse the repository at this point in the history
Patch `silence_periods` for mono-segment recordings
  • Loading branch information
alejoe91 authored Sep 13, 2023
2 parents e6e296b + 6f902d4 commit 292e4fd
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 292e4fd

Please sign in to comment.