Skip to content

Commit 868eeca

Browse files
committed
fixup! fix unbound case
1 parent 63825bc commit 868eeca

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/spikeinterface/widgets/rasters.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ def __init__(
436436
if unit_ids is None:
437437
unit_ids = sorting.unit_ids
438438

439+
depth_dict = None
439440
if isinstance(sorting_analyzer_or_sorting, SortingAnalyzer):
440441
if not sorting_analyzer_or_sorting.has_extension("unit_locations"):
441442
if sort_by_depth:
@@ -446,8 +447,6 @@ def __init__(
446447
depth_dict = {b: i for i, b in enumerate(unit_ids[s_args_depths].tolist())}
447448
elif sort_by_depth:
448449
raise AttributeError("`sort_by_depth=True` requires a SortingAnalyzer")
449-
else:
450-
depth_dict = None
451450

452451
# Create dict of dicts structure
453452
spike_train_data = {}

0 commit comments

Comments
 (0)