mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 14:50:25 +01: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:
|
||||
raise Exception("Only works for correlator matrices.")
|
||||
for t in range(self.T):
|
||||
if self[t] is None:
|
||||
continue
|
||||
for i in range(self.N):
|
||||
for j in range(i + 1, self.N):
|
||||
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)
|
||||
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 (ts is None):
|
||||
raise Exception("ts is required if sort=None.")
|
||||
|
|
Loading…
Add table
Reference in a new issue