diff --git a/hyperspy/io_plugins/hdf5.py b/hyperspy/io_plugins/hdf5.py index eac03b2536..b5e5f55248 100644 --- a/hyperspy/io_plugins/hdf5.py +++ b/hyperspy/io_plugins/hdf5.py @@ -150,7 +150,10 @@ def hdfgroup2signaldict(group): axes.append(dict(group['axis-%i' % i].attrs)) axis = axes[-1] for key, item in axis.items(): - axis[key] = ensure_unicode(item) + if isinstance(item, np.bool_): + axis[key] = bool(item) + else: + axis[key] = ensure_unicode(item) except KeyError: break if len(axes) != len(exp['data'].shape): # broke from the previous loop