Skip to content

Commit

Permalink
Added test of read multiple files with indices
Browse files Browse the repository at this point in the history
  • Loading branch information
iguinn committed Sep 3, 2024
1 parent a87033d commit c835b7c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/lh5/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ def test_read_multiple_files(lh5_file):
assert isinstance(lh5_obj, lgdo.Array)
assert len(lh5_obj) == 9
assert (lh5_obj.nda == np.array([2, 3, 4] * 3)).all()

lh5_obj = lh5.read("/data/struct/array", [lh5_file, lh5_file, lh5_file], idx=[1, 3, 5, 7])
assert len(lh5_obj) == 4
assert (lh5_obj.nda == np.array([3, 2, 4, 3])).all()

0 comments on commit c835b7c

Please sign in to comment.