Skip to content

Commit 9d37b8b

Browse files
committed
Revert "Use norm instead of abs in generic lu factorization (#34575)"
This reverts commit ecc0c43.
1 parent 7301dc6 commit 9d37b8b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

stdlib/LinearAlgebra/src/lu.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ function generic_lufact!(A::StridedMatrix{T}, ::Val{Pivot} = Val(true);
140140
# find index max
141141
kp = k
142142
if Pivot
143-
amax = norm(zero(T))
143+
amax = abs(zero(T))
144144
for i = k:m
145-
absi = norm(A[i,k])
145+
absi = abs(A[i,k])
146146
if absi > amax
147147
kp = i
148148
amax = absi

stdlib/LinearAlgebra/test/generic.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,6 @@ LinearAlgebra.Transpose(a::ModInt{n}) where {n} = transpose(a)
365365

366366
# Needed for pivoting:
367367
Base.abs(a::ModInt{n}) where {n} = a
368-
LinearAlgebra.norm(a::ModInt{n}) where {n} = a
369-
370368
Base.:<(a::ModInt{n}, b::ModInt{n}) where {n} = a.k < b.k
371369

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

0 commit comments

Comments
 (0)