mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
fix: Exception added if unknown value for sorted_list is specified in
Corr.GEVP
This commit is contained in:
parent
c5b25ebdd9
commit
0952252a64
1 changed files with 3 additions and 2 deletions
|
@ -274,8 +274,7 @@ class Corr:
|
||||||
sp_vecs = _GEVP_solver(Gt, G0)
|
sp_vecs = _GEVP_solver(Gt, G0)
|
||||||
sp_vec = sp_vecs[state]
|
sp_vec = sp_vecs[state]
|
||||||
return sp_vec
|
return sp_vec
|
||||||
else:
|
elif sorted_list in ["Eigenvalue", "Eigenvector"]:
|
||||||
|
|
||||||
all_vecs = []
|
all_vecs = []
|
||||||
for t in range(self.T):
|
for t in range(self.T):
|
||||||
try:
|
try:
|
||||||
|
@ -298,6 +297,8 @@ class Corr:
|
||||||
raise Exception("ts is required for the Eigenvector sorting method.")
|
raise Exception("ts is required for the Eigenvector sorting method.")
|
||||||
all_vecs = _sort_vectors(all_vecs, ts)
|
all_vecs = _sort_vectors(all_vecs, ts)
|
||||||
all_vecs = [a[state] for a in all_vecs]
|
all_vecs = [a[state] for a in all_vecs]
|
||||||
|
else:
|
||||||
|
raise Exception("Unkown value for 'sorted_list'.")
|
||||||
|
|
||||||
return all_vecs
|
return all_vecs
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue