mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
fix: Exception added when symmetric or anti_symmetric are called on
multi-dimensional correlator.
This commit is contained in:
parent
ed50240d29
commit
a323d60b79
1 changed files with 4 additions and 0 deletions
|
@ -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")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue