We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bef27f0 commit 2048988Copy full SHA for 2048988
src/svd.jl
@@ -133,7 +133,8 @@ end
133
134
# count positive singular values S ≥ given tolerances, S assumed sorted
135
function _count_svdvals(S, atol::Real, rtol::Real)
136
- tol = max(rtol * (isempty(S) ? zero(eltype(S)) : S[1]), atol)
+ isempty(S) && return 0
137
+ tol = max(rtol * S[1], atol)
138
return iszero(S[1]) ? 0 : searchsortedlast(S, tol, rev=true)
139
end
140
0 commit comments