Skip to content

Commit d4db43c

Browse files
committed
simplify total samples
1 parent 8aeedcc commit d4db43c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/spikeinterface/metrics/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ def compute_total_samples_per_unit(sorting_analyzer, periods=None):
8282
num_samples_in_period += period["end_sample_index"] - period["start_sample_index"]
8383
total_samples[unit_id] = num_samples_in_period
8484
else:
85-
total_samples = {unit_id: sorting_analyzer.get_total_samples() for unit_id in sorting_analyzer.unit_ids}
85+
total = sorting_analyzer.get_total_samples()
86+
total_samples = {unit_id: total for unit_id in sorting_analyzer.unit_ids}
8687
return total_samples
8788

8889

0 commit comments

Comments
 (0)