Skip to content

Commit

Permalink
Add unit tests for LU decomposition of empty real/complex matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
d-torrance committed May 15, 2024
1 parent 2d9afc3 commit 83fa08e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions M2/Macaulay2/tests/normal/LU.m2
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,9 @@ M == L*U
L*U
M
M == checkLU LUdecomposition M

-- empty matrix (reported by Joel Louwsma in Zulip)
scan({map(RR^0, RR^0, {}), map(CC^0, CC^0, {})}, M -> (
checkLU M;
assert Equation(rank M, 0);
assert Equation(det M, 1)))

0 comments on commit 83fa08e

Please sign in to comment.