Skip to content

Commit 57c4e2b

Browse files
authored
Merge pull request #3426 from jiumao2/main
Fix integer overflow in parallel computing
2 parents 50eadce + 41f4c31 commit 57c4e2b

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/spikeinterface/core/job_tools.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,8 @@ def divide_segment_into_chunks(num_frames, chunk_size):
136136
else:
137137
n = num_frames // chunk_size
138138

139-
frame_starts = np.arange(n) * chunk_size
140-
frame_stops = frame_starts + chunk_size
141-
142-
frame_starts = frame_starts.tolist()
143-
frame_stops = frame_stops.tolist()
139+
frame_starts = [i * chunk_size for i in range(n)]
140+
frame_stops = [frame_start + chunk_size for frame_start in frame_starts]
144141

145142
if (num_frames % chunk_size) > 0:
146143
frame_starts.append(n * chunk_size)

0 commit comments

Comments
 (0)