-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavior
Description
Currently, linalg.jl
defines cond(a::AbstractMatrix) = cond(a, 2)
. This only works for square matrices. The correct definition (as well as being more efficient) is:
cond(a::AbstractMatrix) = let s = svdvals(a); max(s) / min(s); end
And cond(a,2)
should also do this, of course.
Note also that cond(a,p)
fails with an exception (Singular system) if a
is singular, whereas it should really give Inf
in that case (or NaN
if a
is all zeros).
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavior