Skip to content

Commit b23734f

Browse files
authored
Update call to scipy.linalg.eigh to not use deprecated eigvals parameter (#210)
Co-authored-by: Blair Bonnett <blair.bonnett@hsu-hh.de> [skip ci]
1 parent a34a20d commit b23734f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
numpy>=1.13
2-
scipy>=0.18.0
2+
scipy>=1.5.0
33
numba>=0.49.1

src/quaternion/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,15 +353,15 @@ def from_rotation_matrix(rot, nonorthogonal=True):
353353

354354
if not shape:
355355
q = zero.copy()
356-
eigvals, eigvecs = linalg.eigh(K3.T, eigvals=(3, 3))
356+
eigvals, eigvecs = linalg.eigh(K3.T, subset_by_index=(3, 3))
357357
q.components[0] = eigvecs[-1]
358358
q.components[1:] = -eigvecs[:-1].flatten()
359359
return q
360360
else:
361361
q = np.empty(shape+(4,), dtype=np.float64)
362362
for flat_index in range(reduce(mul, shape)):
363363
multi_index = np.unravel_index(flat_index, shape)
364-
eigvals, eigvecs = linalg.eigh(K3[multi_index], eigvals=(3, 3))
364+
eigvals, eigvecs = linalg.eigh(K3[multi_index], subset_by_index=(3, 3))
365365
q[multi_index+(0,)] = eigvecs[-1]
366366
q[multi_index+(slice(1,None),)] = -eigvecs[:-1].flatten()
367367
return as_quat_array(q)

0 commit comments

Comments
 (0)