From b715aa0c2295cf95ccd16958cce9158818b9ff06 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Wed, 1 Dec 2021 14:28:21 +0000 Subject: [PATCH] feat: hadrons npr input now returns rank-n tensors instead of 2D matrices --- pyerrors/input/hadrons.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyerrors/input/hadrons.py b/pyerrors/input/hadrons.py index 39afa16c..efe4feb1 100644 --- a/pyerrors/input/hadrons.py +++ b/pyerrors/input/hadrons.py @@ -167,7 +167,7 @@ def read_ExternalLeg_hd5(path, filestem, ens_id, idl=None): imag = Obs([rolled_array[si, sj, ci, cj].imag], [ens_id], idl=[idx]) matrix[si, sj, ci, cj] = CObs(real, imag) - return Npr_matrix(matrix.swapaxes(1, 2).reshape((12, 12), order='F'), mom_in=mom) + return Npr_matrix(matrix, mom_in=mom) def read_Bilinear_hd5(path, filestem, ens_id, idl=None): @@ -219,7 +219,7 @@ def read_Bilinear_hd5(path, filestem, ens_id, idl=None): imag = Obs([rolled_array[si, sj, ci, cj].imag], [ens_id], idl=[idx]) matrix[si, sj, ci, cj] = CObs(real, imag) - result_dict[key] = Npr_matrix(matrix.swapaxes(1, 2).reshape((12, 12), order='F'), mom_in=mom_in, mom_out=mom_out) + result_dict[key] = Npr_matrix(matrix, mom_in=mom_in, mom_out=mom_out) return result_dict