Skip to content

Commit 05a48ea

Browse files
committed
Bump h5py to 3.0
Use the new asstr to decode byte strings.
1 parent 4005bc0 commit 05a48ea

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
'numpy>=1.19',
1515
'scipy>=1.5',
1616
'pandas>=1.1',
17-
'h5py>=2.10',
17+
'h5py>=3.0',
1818
'matplotlib>=3.3',
1919
]
2020

stagpy/stagyyparsers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def time_series_h5(timefile, colnames):
103103
dset = h5f['tseries']
104104
_, ncols = dset.shape
105105
ncols -= 1 # first is istep
106-
h5names = map(bytes.decode, h5f['names'][len(colnames) + 1:])
106+
h5names = h5f['names'].asstr()[len(colnames) + 1:]
107107
_tidy_names(colnames, ncols, h5names)
108108
data = dset[()]
109109
pdf = pd.DataFrame(data[:, 1:],
@@ -209,7 +209,7 @@ def rprof_h5(rproffile, colnames):
209209
with h5py.File(rproffile, 'r') as h5f:
210210
dnames = sorted(dname for dname in h5f.keys()
211211
if dname.startswith('rprof_'))
212-
h5names = map(bytes.decode, h5f['names'][len(colnames):])
212+
h5names = h5f['names'].asstr()[len(colnames):]
213213
for dname in dnames:
214214
dset = h5f[dname]
215215
arr = dset[()]

0 commit comments

Comments
 (0)