mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02: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:
|
if sort == "Eigenvalue" and ts is not None:
|
||||||
warnings.warn("ts has no effect when sorting by eigenvalue is chosen.", RuntimeWarning)
|
warnings.warn("ts has no effect when sorting by eigenvalue is chosen.", RuntimeWarning)
|
||||||
all_vecs = [None] * (t0 + 1)
|
all_vecs = [None] * (t0 + 1)
|
||||||
|
G0 = np.vectorize(lambda x: x.value)(symmetric_corr[t0])
|
||||||
for t in range(t0 + 1, self.T):
|
for t in range(t0 + 1, self.T):
|
||||||
try:
|
try:
|
||||||
G0, Gt = np.empty([self.N, self.N], dtype="double"), np.empty([self.N, self.N], dtype="double")
|
Gt = np.vectorize(lambda x: x.value)(symmetric_corr[t])
|
||||||
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
|
|
||||||
|
|
||||||
all_vecs.append(_GEVP_solver(Gt, G0))
|
all_vecs.append(_GEVP_solver(Gt, G0))
|
||||||
except Exception:
|
except Exception:
|
||||||
all_vecs.append(None)
|
all_vecs.append(None)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue