Skip to content

Commit

Permalink
Subtract 1 from LU pivot indices
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegrabowski committed Dec 31, 2024
1 parent bc1f7d3 commit fe97e5d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/link/numba/test_slinalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit fe97e5d

Please sign in to comment.