Skip to content

Commit

Permalink
Fix hdf5 np.bool (#1129)
Browse files Browse the repository at this point in the history
* hdf5 reader was not converting np.bool_ into bool for axes

* Automatic style corrections courtesy of autopep8
  • Loading branch information
francisco-dlp authored and to266 committed Jul 12, 2016
1 parent f4772e7 commit 2d5d22d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hyperspy/io_plugins/hdf5.py
Expand Up @@ -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
Expand Down

0 comments on commit 2d5d22d

Please sign in to comment.