diff --git a/pyerrors/correlators.py b/pyerrors/correlators.py index 60c72ec0..ef50b743 100644 --- a/pyerrors/correlators.py +++ b/pyerrors/correlators.py @@ -241,7 +241,7 @@ class Corr: if self.N == 1: raise Exception("Trying to symmetrize a correlator matrix, that already has N=1.") - def GEVP(self, t0, ts=None, sort="Eigenvalue"): + def GEVP(self, t0, ts=None, sort="Eigenvalue", **kwargs): """Solve the generalized eigenvalue problem on the current correlator and returns the corresponding eigenvectors. Parameters @@ -261,6 +261,10 @@ class Corr: if self.N == 1: raise Exception("GEVP methods only works on correlator matrices and not single correlators.") + if "sorted_list" in kwargs: + sort = kwargs.get("sorted_list") + warnings.warn("Argument 'sorted_list' is deprecated, use 'sort' instead.", DeprecationWarning) + symmetric_corr = self.matrix_symmetric() if sort is None: if (ts is None): diff --git a/tests/correlators_test.py b/tests/correlators_test.py index 18c578f4..8cc6e520 100644 --- a/tests/correlators_test.py +++ b/tests/correlators_test.py @@ -245,6 +245,9 @@ def test_matrix_corr(): with pytest.warns(RuntimeWarning): corr_mat.GEVP(0, 1, sort="Eigenvalue") + with pytest.warns(DeprecationWarning): + corr_mat.GEVP(0, sorted_list="Eigenvalue") + with pytest.raises(Exception): corr_mat.GEVP(0, 1, sort="This sorting method does not exist.")