Skip to content

Commit

Permalink
Merge pull request #3426 from jiumao2/main
Browse files Browse the repository at this point in the history
Fix integer overflow in parallel computing
  • Loading branch information
alejoe91 authored Sep 23, 2024
2 parents 50eadce + 41f4c31 commit 57c4e2b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/spikeinterface/core/job_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [frame_start + chunk_size for frame_start in frame_starts]

if (num_frames % chunk_size) > 0:
frame_starts.append(n * chunk_size)
Expand Down

0 comments on commit 57c4e2b

Please sign in to comment.