From 160b4a1da7b9d31e6b1c936f8aa9c864ed2f1121 Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins <jrollins@finestructure.net> Date: Fri, 7 Feb 2020 11:06:05 -0800 Subject: [PATCH] Update hdf5 value retrieval swap out deprecated interface --- gwinc/io.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gwinc/io.py b/gwinc/io.py index 51840827..bbef5547 100644 --- a/gwinc/io.py +++ b/gwinc/io.py @@ -1,5 +1,5 @@ -import datetime import h5py +import datetime SCHEMA = 'GWINC noise budget' @@ -42,7 +42,7 @@ def _read_trace_recursive(element): if isinstance(item, h5py.Group): trace[name] = _read_trace_recursive(item) else: - trace[name] = item.value, dict(item.attrs.items()) + trace[name] = item[:], dict(item.attrs.items()) return trace @@ -54,7 +54,7 @@ def load_hdf5(path): """ with h5py.File(path, 'r') as f: # FIXME: check SCHEMA name/version - freq = f['Freq'].value + freq = f['Freq'][:] traces = _read_trace_recursive(f['/traces']) attrs = dict(f.attrs.items()) return freq, traces, attrs -- GitLab