mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 14:50:25 +01:00
refactor: GEVP matrix cast also simplified for unsorted case.
This commit is contained in:
parent
42f1e6e7fb
commit
d7649834d5
1 changed files with 2 additions and 6 deletions
|
@ -311,12 +311,8 @@ class Corr:
|
|||
raise Exception("ts is required if sort=None.")
|
||||
if (self.content[t0] is None) or (self.content[ts] is None):
|
||||
raise Exception("Corr not defined at t0/ts.")
|
||||
G0, Gt = np.empty([self.N, self.N], dtype="double"), np.empty([self.N, self.N], dtype="double")
|
||||
for i in range(self.N):
|
||||
for j in range(self.N):
|
||||
G0[i, j] = symmetric_corr[t0][i, j].value
|
||||
Gt[i, j] = symmetric_corr[ts][i, j].value
|
||||
|
||||
G0 = np.vectorize(lambda x: x.value)(symmetric_corr[t0])
|
||||
Gt = np.vectorize(lambda x: x.value)(symmetric_corr[ts])
|
||||
reordered_vecs = _GEVP_solver(Gt, G0)
|
||||
|
||||
elif sort in ["Eigenvalue", "Eigenvector"]:
|
||||
|
|
Loading…
Add table
Reference in a new issue