Skip to content

Commit c062ca9

Browse files
author
sprenger
committed
[tdt] fix border id handling for chunk loading
1 parent 3940b2d commit c062ca9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

neo/rawio/tdtrawio.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,9 @@ def _get_analogsignal_chunk(self, block_index, seg_index, i_start, i_stop,
389389
# right border
390390
# be careful that bl could be both bl0 and bl1!!
391391
border = data.size - (i_stop % sample_per_chunk)
392-
data = data[:-border]
392+
# cut data if not all samples are requested
393+
if border != len(data):
394+
data = data[:-border]
393395
if bl == bl0:
394396
# left border
395397
border = i_start % sample_per_chunk

0 commit comments

Comments
 (0)