Skip to content

Commit 5a31e7f

Browse files
authored
Merge pull request #25 from Fred2371218232/test1
Fixed dependency issue for scipy
2 parents c2efce0 + 5e3c3be commit 5a31e7f

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

.github/workflows/build-code.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,8 @@ jobs:
6767
- name: Test with pytest
6868
run: |
6969
# conda install -yq -c ${CONDA_PREFIX}/conda-bld/ msmbuilder2022
70-
pip install pytest==8.0.2
71-
conda install scipy=1.13.1
7270
conda install -yq numdifftools hmmlearn
71+
pip install pytest==8.0.2
7372
mkdir ../../pkgs
7473
cp -r msmbuilder/tests ../../pkgs
7574
cd ../../pkgs

msmbuilder/decomposition/_speigh.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def speigh(double[:, ::1] A, double[:, ::1] B, double rho, double eps=1e-6,
124124
cdef double[::1] b = np.empty(N)
125125
# Initialize solver from dominant generalized eigenvector (unregularized
126126
# solution)
127-
x = scipy.linalg.eigh(A, B, eigvals=(N-1, N-1))[1][:,0]
127+
x = scipy.linalg.eigh(A, B, subset_by_index=[N-1, N-1])[1][:,0]
128128

129129
cdef double[::1] B_eigvals
130130
cdef double[:, ::1] B_eigvecs
@@ -182,7 +182,7 @@ def speigh(double[:, ::1] A, double[:, ::1] B, double rho, double eps=1e-6,
182182
u = Ak[0,0] / Bk[0,0]
183183
else:
184184
gevals, gevecs = scipy.linalg.eigh(
185-
Ak, Bk, eigvals=(Ak.shape[0]-1, Ak.shape[0]-1))
185+
Ak, Bk, subset_by_index=[Ak.shape[0]-1, Ak.shape[0]-1])
186186
# Usually slower to use sparse linear algebra here
187187
# gevals, gevecs = scipy.sparse.linalg.eigsh(
188188
# A=Ak, M=Bk, k=1, v0=x[mask], which='LA')

msmbuilder/decomposition/tica.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def _solve(self):
186186
raise RuntimeError('correlation matrix is not symmetric')
187187

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

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

0 commit comments

Comments
 (0)