Skip to content

Commit

Permalink
Fix a CI failure on h5py 3 (#388)
Browse files Browse the repository at this point in the history
Closes #387. h5py 3 overhauls how string serialization works, meaning that the reader always has to ask for them to be decoded back to `str` from `bytes`.
  • Loading branch information
eric-wieser authored Dec 28, 2020
1 parent 9a528a0 commit 6dfbeb8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion clifford/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,9 @@ def read_ga_file(file_name):
else:
support = None
metric = f['metric'][:]
basis_names = f['basis_names'][:]
if hasattr(h5py.Dataset, 'asstr'):
basis_names = f['basis_names'].asstr()[:]
else:
# h5py < 3
basis_names = f['basis_names'][:]
return data_array, metric, basis_names, support

0 comments on commit 6dfbeb8

Please sign in to comment.