mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 03:53:41 +02:00
Merge branch 'develop' into documentation
This commit is contained in:
commit
f807fe5727
2 changed files with 8 additions and 3 deletions
|
@ -279,6 +279,8 @@ class Corr:
|
|||
sp_vec = sp_vecs[state]
|
||||
return sp_vec
|
||||
elif sorted_list in ["Eigenvalue", "Eigenvector"]:
|
||||
if sorted_list == "Eigenvalue" and ts is not None:
|
||||
warnings.warn("ts has no effect when sorting by eigenvalue is chosen.", RuntimeWarning)
|
||||
all_vecs = []
|
||||
for t in range(self.T):
|
||||
try:
|
||||
|
|
|
@ -230,8 +230,8 @@ def test_matrix_corr():
|
|||
corr_mat = pe.Corr(np.array([[corr_aa, corr_ab], [corr_ab, corr_aa]]))
|
||||
corr_mat.item(0, 0)
|
||||
|
||||
vec_0 = corr_mat.GEVP(0, 0)
|
||||
vec_1 = corr_mat.GEVP(0, 0, state=1)
|
||||
vec_0 = corr_mat.GEVP(0, 0, sorted_list=None)
|
||||
vec_1 = corr_mat.GEVP(0, 0, state=1, sorted_list=None)
|
||||
|
||||
corr_0 = corr_mat.projected(vec_0)
|
||||
corr_1 = corr_mat.projected(vec_1)
|
||||
|
@ -239,11 +239,14 @@ def test_matrix_corr():
|
|||
assert np.all([o == 0 for o in corr_0 - corr_aa])
|
||||
assert np.all([o == 0 for o in corr_1 - corr_aa])
|
||||
|
||||
corr_mat.GEVP(0, 0, sorted_list="Eigenvalue")
|
||||
corr_mat.GEVP(0, sorted_list="Eigenvalue")
|
||||
corr_mat.GEVP(0, 0, sorted_list="Eigenvector")
|
||||
|
||||
corr_mat.matrix_symmetric()
|
||||
|
||||
with pytest.warns(RuntimeWarning):
|
||||
corr_mat.GEVP(0, 1, sorted_list="Eigenvalue")
|
||||
|
||||
with pytest.raises(Exception):
|
||||
corr_mat.plottable()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue