Skip to content

Commit

Permalink
Revert "Use norm instead of abs in generic lu factorization (#34575)" (
Browse files Browse the repository at this point in the history
…#36096)

This reverts commit ecc0c43.
  • Loading branch information
andreasnoack authored Jun 2, 2020
1 parent fc279ca commit be2c643
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions stdlib/LinearAlgebra/src/lu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ function generic_lufact!(A::StridedMatrix{T}, ::Val{Pivot} = Val(true);
# find index max
kp = k
if Pivot
amax = norm(zero(T))
amax = abs(zero(T))
for i = k:m
absi = norm(A[i,k])
absi = abs(A[i,k])
if absi > amax
kp = i
amax = absi
Expand Down
2 changes: 0 additions & 2 deletions stdlib/LinearAlgebra/test/generic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,6 @@ LinearAlgebra.Transpose(a::ModInt{n}) where {n} = transpose(a)

# Needed for pivoting:
Base.abs(a::ModInt{n}) where {n} = a
LinearAlgebra.norm(a::ModInt{n}) where {n} = a

Base.:<(a::ModInt{n}, b::ModInt{n}) where {n} = a.k < b.k

@test A*(lu(A, Val(true))\b) == b
Expand Down

0 comments on commit be2c643

Please sign in to comment.