From 83fa08eb0da7815bc426511293bae3c1c3472ce1 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Wed, 15 May 2024 14:14:23 -0400 Subject: [PATCH] Add unit tests for LU decomposition of empty real/complex matrices --- M2/Macaulay2/tests/normal/LU.m2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/M2/Macaulay2/tests/normal/LU.m2 b/M2/Macaulay2/tests/normal/LU.m2 index 3487bea7d7a..d7199c76d53 100644 --- a/M2/Macaulay2/tests/normal/LU.m2 +++ b/M2/Macaulay2/tests/normal/LU.m2 @@ -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)))