Skip to content

Commit

Permalink
improve performance of read_object with idx by reading in whole objec…
Browse files Browse the repository at this point in the history
…t, then slicing
  • Loading branch information
lvarriano committed Nov 6, 2023
1 parent 6901bf3 commit ec55d3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lgdo/lh5_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ def read_object(
tmp_shape = (0,) + h5f[name].shape[1:]
nda = np.empty(tmp_shape, h5f[name].dtype)
else:
nda = h5f[name][source_sel]
nda = h5f[name][...][source_sel]

# special handling for bools
# (c and Julia store as uint8 so cast to bool)
Expand Down

0 comments on commit ec55d3c

Please sign in to comment.