mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 11:33:42 +02:00
tests: GEVP test extendd, test case for warning when ts and Eigenvalue
sorting are used at the same time.
This commit is contained in:
parent
e557c9b54d
commit
c852de0688
1 changed files with 6 additions and 3 deletions
|
@ -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