Skip to content

Commit

Permalink
Make name of h5dsets more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
mraspaud committed Jun 19, 2024
1 parent 5062421 commit 2c6af5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion satpy/readers/hdf5_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def from_h5_array(h5dset):
chunk_size = dc.get("array.chunk-size")

chunks = normalize_chunks(chunk_size, dtype=h5dset.dtype, previous_chunks=h5dset.chunks, shape=h5dset.shape)
name = tokenize(os.fspath(h5dset.file.filename), h5dset.name, chunks)
name = h5dset.name + "-" + tokenize(os.fspath(h5dset.file.filename), h5dset.name, chunks)

dset_data = da.from_array(h5dset, chunks=chunks, name=name)
return dset_data
1 change: 1 addition & 0 deletions satpy/tests/reader_tests/test_hdf5_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,4 @@ def test_array_name_uniqueness(self):
dsname = "test_group/ds1_f"

assert file_handler[dsname].data.name == file_handler[dsname].data.name
assert file_handler[dsname].data.name.startswith("/" + dsname)

0 comments on commit 2c6af5e

Please sign in to comment.