Commit b420043b authored by Thomas Vincent's avatar Thomas Vincent
Browse files

use h5py_read_dataset to read data to convert string to str

parent 1c712834
......@@ -39,6 +39,11 @@ import numpy as _np
from ..util import text_type
from ._utils import str_to_h5_utf8
try: # silx >= 0.14
from import h5py_read_dataset
except ImportError: # Fall back for silx < 0.14
from ..util.silx_io_utils import h5py_read_dataset
# We have to work around a limitation of the h5py.Group.copy method
# that fails when a group already exists in the destination file.
......@@ -179,7 +184,7 @@ class XsocsH5Base(object):
return h5_file[path].shape
if dtype:
return h5_file[path].dtype
return h5_file[path][()]
return h5py_read_dataset(h5_file[path], decode_ascii=True)
except KeyError:
return None
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment