diff --git a/prody/utilities/eigtools.py b/prody/utilities/eigtools.py index 875439ebb..543e71c01 100644 --- a/prody/utilities/eigtools.py +++ b/prody/utilities/eigtools.py @@ -42,11 +42,11 @@ def _eigh(M, eigvals=None, turbo=True): if not issparse(M): try: values, vectors = linalg.eigh(M, turbo=turbo, eigvals=eigvals) - except AttributeError: + except TypeError: if turbo: - values, vectors = linalg.eigh(M, driver='evd', eigvals=eigvals) + values, vectors = linalg.eigh(M, driver='evd', subset_by_index=eigvals) else: - values, vectors = linalg.eigh(M, eigvals=eigvals) + values, vectors = linalg.eigh(M, subset_by_index=eigvals) else: try: from scipy.sparse import linalg as scipy_sparse_la