From a323d60b799532cbbe565014e882823d3b14b05e Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Mon, 13 Jun 2022 13:08:05 +0100 Subject: [PATCH] fix: Exception added when symmetric or anti_symmetric are called on multi-dimensional correlator. --- pyerrors/correlators.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyerrors/correlators.py b/pyerrors/correlators.py index 34804d57..287f915c 100644 --- a/pyerrors/correlators.py +++ b/pyerrors/correlators.py @@ -197,6 +197,8 @@ class Corr: def symmetric(self): """ Symmetrize the correlator around x0=0.""" + if self.N != 1: + raise Exception('symmetric cannot be safely applied to multi-dimensional correlators.') if self.T % 2 != 0: raise Exception("Can not symmetrize odd T") @@ -215,6 +217,8 @@ class Corr: def anti_symmetric(self): """Anti-symmetrize the correlator around x0=0.""" + if self.N != 1: + raise Exception('anti_symmetric cannot be safely applied to multi-dimensional correlators.') if self.T % 2 != 0: raise Exception("Can not symmetrize odd T")