Skip to content

Commit

Permalink
fix for numba windows inplace sort bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmgray committed Jun 12, 2024
1 parent 8e59771 commit 688bf95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
testset: [matrix, tensor]
env: [base]
os: [ubuntu-latest]
python-version: [3.9, '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12']
flaky: [false]

include:
Expand Down
4 changes: 2 additions & 2 deletions quimb/linalg/autoblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,15 @@ def _eigvalsh_autoblocked(A, sort=True): # pragma: no cover
gs = compute_blocks(ix, jx, d)
gs = [np.array(g) for g in gs]

for i, g in enumerate(gs):
for _, g in enumerate(gs):
if len(g) == 1:
el[g[0]] = A[g[0], g[0]]
continue

el[g] = np.linalg.eigvalsh(subselect(A, g))

if sort:
el[:] = np.sort(el)
return np.sort(el)

return el

Expand Down

0 comments on commit 688bf95

Please sign in to comment.