From 0952252a647204ae4c7d6327015ebc4b6ab5ab49 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Mon, 2 May 2022 12:58:43 +0100 Subject: [PATCH] fix: Exception added if unknown value for sorted_list is specified in Corr.GEVP --- pyerrors/correlators.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyerrors/correlators.py b/pyerrors/correlators.py index c569d5e0..b060d72a 100644 --- a/pyerrors/correlators.py +++ b/pyerrors/correlators.py @@ -274,8 +274,7 @@ class Corr: sp_vecs = _GEVP_solver(Gt, G0) sp_vec = sp_vecs[state] return sp_vec - else: - + elif sorted_list in ["Eigenvalue", "Eigenvector"]: all_vecs = [] for t in range(self.T): try: @@ -298,6 +297,8 @@ class Corr: raise Exception("ts is required for the Eigenvector sorting method.") all_vecs = _sort_vectors(all_vecs, ts) all_vecs = [a[state] for a in all_vecs] + else: + raise Exception("Unkown value for 'sorted_list'.") return all_vecs