Skip to content

Commit 6637343

Browse files
authored
Bug fix in LH5Store.read(): check for n_rows longer than idxs before dropping (#65)
check for n_rows longer than idxs before dropping
1 parent 3a08280 commit 6637343

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lgdo/lh5/store.py

+2
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,8 @@ def read(
415415
if idx is not None:
416416
# check if idx is just an ordered list of the integers if so can ignore
417417
if (idx[0] == np.arange(0, len(idx[0]), 1)).all():
418+
if n_rows > len(idx[0]):
419+
n_rows = len(idx[0])
418420
idx = None
419421
else:
420422
# chop off indices < start_row

0 commit comments

Comments
 (0)