From 891617249dc44dcdc40a25afd6549b90ee397ed0 Mon Sep 17 00:00:00 2001 From: Mayo Faulkner <mayo.faulkner@ucl.ac.uk> Date: Tue, 20 Jul 2021 16:52:36 +0100 Subject: [PATCH] load in npz files --- one/alf/io.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/one/alf/io.py b/one/alf/io.py index 37a3cec..e62919e 100644 --- a/one/alf/io.py +++ b/one/alf/io.py @@ -280,6 +280,8 @@ def load_file_content(fil): return jsonable.read(fil) if fil.suffix == '.npy': return _ensure_flat(np.load(file=fil, allow_pickle=True)) + if fil.suffix == '.npz': + return _ensure_flat(np.load(file=fil, allow_pickle=True)['arr_0']) if fil.suffix == '.pqt': return parquet.load(fil)[0] if fil.suffix == '.ssv': -- GitLab