Skip to content

Commit bf48977

Browse files
committed
fixed overflow error in axonarawio when loading long recordings
1 parent 021feed commit bf48977

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

neo/rawio/axonarawio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def _get_analogsignal_chunk(self, block_index, seg_index, i_start, i_stop, strea
386386
offset = i_start // 3 * (bin_dict["bytes_packet"] // 2)
387387
rem = i_start % 3
388388

389-
raw_samples = np.arange(num_packets_oi + 1, dtype=np.uint32)
389+
raw_samples = np.arange(num_packets_oi + 1, dtype=np.uint64)
390390
sample1 = raw_samples * (bin_dict["bytes_packet"] // 2) + bin_dict["bytes_head"] // 2 + offset
391391
sample2 = sample1 + 64
392392
sample3 = sample2 + 64
@@ -402,7 +402,7 @@ def _get_analogsignal_chunk(self, block_index, seg_index, i_start, i_stop, strea
402402

403403
for i, ch_idx in enumerate(channel_indexes):
404404
chan_offset = self.channel_memory_offset[ch_idx]
405-
raw_signals[:, i] = self._raw_signals[sig_ids + chan_offset]
405+
raw_signals[:, i] = self._raw_signals[np.uint64(sig_ids) + chan_offset]
406406

407407
return raw_signals
408408

0 commit comments

Comments
 (0)