Skip to content

Commit 86dd9cb

Browse files
Subtract 1 from LU pivot indices
1 parent 174390a commit 86dd9cb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/link/numba/test_slinalg.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,10 @@ def getrf(x):
252252

253253
assert info == 0
254254
assert_allclose(LU, lu)
255-
assert_allclose(IPIV, ipiv)
255+
256+
# TODO: It seems IPIV is 1-indexed in FORTRAN, so we need to subtract 1. I can't find evidence that scipy is doing
257+
# this, though.
258+
assert_allclose(IPIV - 1, ipiv)
256259

257260

258261
@pytest.mark.parametrize("trans", [0, 1])

0 commit comments

Comments
 (0)