From 89e41c643032c7e119a5396f0b2da1d9debfb8ff Mon Sep 17 00:00:00 2001 From: "Adam J. Jackson" Date: Thu, 15 Feb 2024 14:43:01 +0000 Subject: [PATCH] Avoid "squeezing" out q-point axis when loading JSON --- euphonic/io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/euphonic/io.py b/euphonic/io.py index c4d0366fd..e89a09580 100644 --- a/euphonic/io.py +++ b/euphonic/io.py @@ -38,7 +38,7 @@ def _from_json_dict(dictionary: Dict[str, Any], dictionary[key] = [tuple(x) for x in val] elif key in type_dict and type_dict[key] == np.complex128: dictionary[key] = np.array( - val, dtype=np.float64).view(np.complex128).squeeze() + val, dtype=np.float64).view(np.complex128).squeeze(axis=-1) else: dictionary[key] = np.array(val) elif isinstance(val, dict):