Skip to content

Commit

Permalink
Merge pull request #1958 from jamesmkrieger/scipy_turbo
Browse files Browse the repository at this point in the history
eigh evd when no turbo
  • Loading branch information
jamesmkrieger authored Sep 27, 2024
2 parents 9639506 + 6b3f753 commit e769fbc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion prody/utilities/eigtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ def _eigh(M, eigvals=None, turbo=True):
if eigvals:
turbo = False
if not issparse(M):
values, vectors = linalg.eigh(M, turbo=turbo, eigvals=eigvals)
try:
values, vectors = linalg.eigh(M, turbo=turbo, eigvals=eigvals)
except TypeError:
if turbo:
values, vectors = linalg.eigh(M, driver='evd', subset_by_index=eigvals)
else:
values, vectors = linalg.eigh(M, subset_by_index=eigvals)
else:
try:
from scipy.sparse import linalg as scipy_sparse_la
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[build-system]
requires = ["setuptools", "wheel", "numpy>=1.10,<1.25", "pyparsing<=3.1.1", "scipy<=1.13.1"]
requires = ["setuptools", "wheel", "numpy>=1.10,<1.24", "pyparsing<=3.1.1", "scipy"]
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
sys.exit()

if sys.version_info[:2] == (2, 7) or sys.version_info[:2] <= (3, 5):
INSTALL_REQUIRES=['numpy>=1.10,<1.25', 'biopython<=1.76', 'pyparsing', 'scipy']
INSTALL_REQUIRES=['numpy>=1.10', 'biopython<=1.76', 'pyparsing', 'scipy']
else:
INSTALL_REQUIRES=['numpy>=1.10,<1.24', 'biopython', 'pyparsing<=3.1.1', 'scipy<=1.13.1', 'setuptools']
INSTALL_REQUIRES=['numpy>=1.10,<1.24', 'biopython', 'pyparsing<=3.1.1', 'scipy', 'setuptools']

if sys.version_info[0] == 3 and sys.version_info[1] < 6:
sys.stderr.write('Python 3.5 and older is not supported\n')
Expand Down

0 comments on commit e769fbc

Please sign in to comment.