mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
feat: check for symmetric matrix added to GEVP for speed up, None case
treated correctly in is_matrix_symmetric.
This commit is contained in:
parent
7d280b3e26
commit
42f62380b4
1 changed files with 6 additions and 1 deletions
|
@ -242,6 +242,8 @@ class Corr:
|
||||||
if self.N == 1:
|
if self.N == 1:
|
||||||
raise Exception("Only works for correlator matrices.")
|
raise Exception("Only works for correlator matrices.")
|
||||||
for t in range(self.T):
|
for t in range(self.T):
|
||||||
|
if self[t] is None:
|
||||||
|
continue
|
||||||
for i in range(self.N):
|
for i in range(self.N):
|
||||||
for j in range(i + 1, self.N):
|
for j in range(i + 1, self.N):
|
||||||
if self[t][i, j] is self[t][j, i]:
|
if self[t][i, j] is self[t][j, i]:
|
||||||
|
@ -297,7 +299,10 @@ class Corr:
|
||||||
warnings.warn("Argument 'sorted_list' is deprecated, use 'sort' instead.", DeprecationWarning)
|
warnings.warn("Argument 'sorted_list' is deprecated, use 'sort' instead.", DeprecationWarning)
|
||||||
sort = kwargs.get("sorted_list")
|
sort = kwargs.get("sorted_list")
|
||||||
|
|
||||||
symmetric_corr = self.matrix_symmetric()
|
if self.is_matrix_symmetric():
|
||||||
|
symmetric_corr = self
|
||||||
|
else:
|
||||||
|
symmetric_corr = self.matrix_symmetric()
|
||||||
if sort is None:
|
if sort is None:
|
||||||
if (ts is None):
|
if (ts is None):
|
||||||
raise Exception("ts is required if sort=None.")
|
raise Exception("ts is required if sort=None.")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue