From b63221ed1419dcdf08ee66c724a1d2815acce246 Mon Sep 17 00:00:00 2001 From: Yue Huang <806628409@qq.com> Date: Thu, 19 Sep 2024 02:07:02 +0800 Subject: [PATCH] Update job_tools.py --- src/spikeinterface/core/job_tools.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/spikeinterface/core/job_tools.py b/src/spikeinterface/core/job_tools.py index a5279247f5..55870cd688 100644 --- a/src/spikeinterface/core/job_tools.py +++ b/src/spikeinterface/core/job_tools.py @@ -136,11 +136,8 @@ def divide_segment_into_chunks(num_frames, chunk_size): else: n = num_frames // chunk_size - frame_starts = np.arange(n) * chunk_size - frame_stops = frame_starts + chunk_size - - frame_starts = frame_starts.tolist() - frame_stops = frame_stops.tolist() + frame_starts = [i * chunk_size for i in range(n)] + frame_stops = [(i+1) * chunk_size for i in range(n)] if (num_frames % chunk_size) > 0: frame_starts.append(n * chunk_size)