From 688bf950d71d2fcebc888cafae95a2bdffb711ee Mon Sep 17 00:00:00 2001 From: Johnnie Gray Date: Tue, 11 Jun 2024 22:17:33 -0700 Subject: [PATCH] fix for numba windows inplace sort bug --- .github/workflows/tests.yml | 2 +- quimb/linalg/autoblock.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6b47bfb6..733ff025 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: diff --git a/quimb/linalg/autoblock.py b/quimb/linalg/autoblock.py index 44687610..2aeae477 100644 --- a/quimb/linalg/autoblock.py +++ b/quimb/linalg/autoblock.py @@ -210,7 +210,7 @@ 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 @@ -218,7 +218,7 @@ def _eigvalsh_autoblocked(A, sort=True): # pragma: no cover el[g] = np.linalg.eigvalsh(subselect(A, g)) if sort: - el[:] = np.sort(el) + return np.sort(el) return el