Skip to content

Commit

Permalink
Update src/spikeinterface/sortingcomponents/tools.py
Browse files Browse the repository at this point in the history
Co-authored-by: Garcia Samuel <[email protected]>
  • Loading branch information
yger and samuelgarcia authored Jan 14, 2025
1 parent 23dcacd commit 827fb4d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/spikeinterface/sortingcomponents/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ def get_shuffled_recording_slices(recording, seed=None, **job_kwargs):
chunks = divide_segment_into_chunks(num_frames, chunk_size)
recording_slices.extend([(segment_index, frame_start, frame_stop) for frame_start, frame_stop in chunks])

if seed is not None:
rng = np.random.RandomState(seed)
recording_slices = rng.permutation(recording_slices)

rng = np.random.default_rng(seed)
recording_slices = rng.permutation(recording_slices)

return recording_slices

0 comments on commit 827fb4d

Please sign in to comment.