feat: exception type for correlator trace of 1dim correlator changed.

This commit is contained in:
Fabian Joswig 2023-07-17 10:57:13 +01:00
parent 4467a2777f
commit 9bf4a9f20d
No known key found for this signature in database

View file

@ -257,7 +257,7 @@ class Corr:
def trace(self):
"""Calculates the per-timeslice trace of a correlator matrix."""
if self.N == 1:
raise TypeError("Only works for correlator matrices.")
raise ValueError("Only works for correlator matrices.")
newcontent = []
for t in range(self.T):
if _check_for_none(self, self.content[t]):