Skip to content

Commit 6f03ea5

Browse files
Fix precision issue in singularity check
1 parent bae5180 commit 6f03ea5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/array/lu.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ end
3737
function update_ipiv!(ipivl::AbstractVector{Int}, piv_idx::AbstractVector{Int}, piv_val::AbstractVector{T}, k::Int, nb::Int) where T
3838
max_piv_idx = argmax(abs.(piv_val))
3939
max_piv_val = abs(piv_val[max_piv_idx])
40-
isapprox(max_piv_val, zero(T); atol=eps(T)) && throw(LinearAlgebra.SingularException(k))
40+
isapprox(max_piv_val, zero(T); atol=eps(real(T))) && throw(LinearAlgebra.SingularException(k))
4141
ipivl[1] = (max_piv_idx+k-2)*nb + piv_idx[max_piv_idx]
4242
end
4343

0 commit comments

Comments
 (0)