mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 14:50:25 +01:00
refactor: matrix Obs to double cast simplified.
This commit is contained in:
parent
94bbd75b1d
commit
42f1e6e7fb
1 changed files with 2 additions and 6 deletions
|
@ -323,14 +323,10 @@ class Corr:
|
|||
if sort == "Eigenvalue" and ts is not None:
|
||||
warnings.warn("ts has no effect when sorting by eigenvalue is chosen.", RuntimeWarning)
|
||||
all_vecs = [None] * (t0 + 1)
|
||||
G0 = np.vectorize(lambda x: x.value)(symmetric_corr[t0])
|
||||
for t in range(t0 + 1, self.T):
|
||||
try:
|
||||
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[t][i, j].value
|
||||
|
||||
Gt = np.vectorize(lambda x: x.value)(symmetric_corr[t])
|
||||
all_vecs.append(_GEVP_solver(Gt, G0))
|
||||
except Exception:
|
||||
all_vecs.append(None)
|
||||
|
|
Loading…
Add table
Reference in a new issue