Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed dependency issue for scipy #25

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/build-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,8 @@ jobs:
- name: Test with pytest
run: |
# conda install -yq -c ${CONDA_PREFIX}/conda-bld/ msmbuilder2022
pip install pytest==8.0.2
conda install scipy=1.13.1
conda install -yq numdifftools hmmlearn
pip install pytest==8.0.2
mkdir ../../pkgs
cp -r msmbuilder/tests ../../pkgs
cd ../../pkgs
Expand Down
4 changes: 2 additions & 2 deletions msmbuilder/decomposition/_speigh.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def speigh(double[:, ::1] A, double[:, ::1] B, double rho, double eps=1e-6,
cdef double[::1] b = np.empty(N)
# Initialize solver from dominant generalized eigenvector (unregularized
# solution)
x = scipy.linalg.eigh(A, B, eigvals=(N-1, N-1))[1][:,0]
x = scipy.linalg.eigh(A, B, subset_by_index=[N-1, N-1])[1][:,0]

cdef double[::1] B_eigvals
cdef double[:, ::1] B_eigvecs
Expand Down Expand Up @@ -182,7 +182,7 @@ def speigh(double[:, ::1] A, double[:, ::1] B, double rho, double eps=1e-6,
u = Ak[0,0] / Bk[0,0]
else:
gevals, gevecs = scipy.linalg.eigh(
Ak, Bk, eigvals=(Ak.shape[0]-1, Ak.shape[0]-1))
Ak, Bk, subset_by_index=[Ak.shape[0]-1, Ak.shape[0]-1])
# Usually slower to use sparse linear algebra here
# gevals, gevecs = scipy.sparse.linalg.eigsh(
# A=Ak, M=Bk, k=1, v0=x[mask], which='LA')
Expand Down
2 changes: 1 addition & 1 deletion msmbuilder/decomposition/tica.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def _solve(self):
raise RuntimeError('correlation matrix is not symmetric')

vals, vecs = scipy.linalg.eigh(lhs, b=rhs,
eigvals=(self.n_features-self.n_components, self.n_features-1))
subset_by_index=[self.n_features-self.n_components, self.n_features-1])

# sort in order of decreasing value
ind = np.argsort(vals)[::-1]
Expand Down
Loading