From fe97e5db9c6677a25442897b50750ed6789ce568 Mon Sep 17 00:00:00 2001 From: Jesse Grabowski Date: Tue, 31 Dec 2024 23:22:55 +0800 Subject: [PATCH] Subtract 1 from LU pivot indices --- tests/link/numba/test_slinalg.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/link/numba/test_slinalg.py b/tests/link/numba/test_slinalg.py index 284c9227a7..7b0215bbc5 100644 --- a/tests/link/numba/test_slinalg.py +++ b/tests/link/numba/test_slinalg.py @@ -252,7 +252,10 @@ def getrf(x): assert info == 0 assert_allclose(LU, lu) - assert_allclose(IPIV, ipiv) + + # TODO: It seems IPIV is 1-indexed in FORTRAN, so we need to subtract 1. I can't find evidence that scipy is doing + # this, though. + assert_allclose(IPIV - 1, ipiv) @pytest.mark.parametrize("trans", [0, 1])