Skip to content

Commit 52b0052

Browse files
committed
Add check for None in 'NoiseGeneratorRecordingSegment' get_traces().
1 parent c929e51 commit 52b0052

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/spikeinterface/core/generate.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,6 +1209,12 @@ def get_traces(
12091209
end_frame: Union[int, None] = None,
12101210
channel_indices: Union[List, None] = None,
12111211
) -> np.ndarray:
1212+
1213+
if start_frame is None:
1214+
start_frame = 0
1215+
if end_frame is None:
1216+
end_frame = self.get_num_samples()
1217+
12121218
start_frame_within_block = start_frame % self.noise_block_size
12131219
end_frame_within_block = end_frame % self.noise_block_size
12141220
num_samples = end_frame - start_frame

0 commit comments

Comments
 (0)