From 841c4b33ad32248deb96bf83fdc27dc265a1bb4e Mon Sep 17 00:00:00 2001 From: Antoine Marteau Date: Fri, 2 May 2025 15:55:08 +1000 Subject: [PATCH 1/2] Warn that inv throws on singular matrices --- src/generic.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/generic.jl b/src/generic.jl index afbd7b9f..e6cfe8b0 100644 --- a/src/generic.jl +++ b/src/generic.jl @@ -1152,6 +1152,8 @@ Matrix inverse. Computes matrix `N` such that Computed by solving the left-division `N = M \\ I`. +A [`SingularException`](@ref) is thrown if `M` fails to be numerically inverted. + # Examples ```jldoctest julia> M = [2 5; 1 3] From 05b703bb7895c8409b8980b82ea6e8209d7676ca Mon Sep 17 00:00:00 2001 From: "Viral B. Shah" Date: Thu, 8 May 2025 17:25:10 -0400 Subject: [PATCH 2/2] Update generic.jl --- src/generic.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic.jl b/src/generic.jl index e6cfe8b0..02058602 100644 --- a/src/generic.jl +++ b/src/generic.jl @@ -1152,7 +1152,7 @@ Matrix inverse. Computes matrix `N` such that Computed by solving the left-division `N = M \\ I`. -A [`SingularException`](@ref) is thrown if `M` fails to be numerically inverted. +A [`SingularException`](@ref) is thrown if `M` fails numerical inversion. # Examples ```jldoctest