Skip to content

Commit

Permalink
Refactor: Simplify iterator method in HDF5DataStore
Browse files Browse the repository at this point in the history
  • Loading branch information
hllelli2 committed Oct 9, 2024
1 parent 36a5883 commit b24d299
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/caked/hdf5.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ def __getitem__(self, key: str):

def __iter__(self):
with h5py.File(self.save_path, "r") as f:
for key in f:
yield key
yield from f

def get(self, key: str, default=None, to_torch: bool = False):
try:
Expand Down

0 comments on commit b24d299

Please sign in to comment.