Skip to content

Commit

Permalink
bugfix make scale string dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasprobst committed Apr 8, 2024
1 parent 477b809 commit 31368ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions h5rdmtoolbox/wrapper/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,9 +583,15 @@ def create_string_dataset(self,

compression = kwargs.pop('compression', get_config('hdf_compression'))
compression_opts = kwargs.pop('compression_opts', get_config('hdf_compression_opts'))
make_scale = kwargs.pop('make_scale', False)
ds = super().create_dataset(name, dtype=dtype, data=data,
compression=compression,
compression_opts=compression_opts, **kwargs)
if make_scale:
if isinstance(data, str):
ds.make_scale(make_scale)
else:
ds.make_scale()

for ak, av in attrs.items():
ds.attrs[ak] = av
Expand Down

0 comments on commit 31368ff

Please sign in to comment.