Skip to content

Commit cfa2846

Browse files
committed
deprecate previous behavior
1 parent 8a2ca1a commit cfa2846

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

stdlib/LinearAlgebra/src/lu.jl

+6-6
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ function lu!(A::HermOrSym, pivot::Symbol = :rowmax; check::Bool = true)
9292
lu!(A.data, pivot; check = check)
9393
end
9494
# for backward compatibility
95-
# TODO: remove/deprecate towards Julia v2
96-
lu!(A::Union{StridedMatrix,HermOrSym,Tridiagonal}, ::Val{true}; check::Bool = true) = lu!(A, :rowmax; check=check)
97-
lu!(A::Union{StridedMatrix,HermOrSym,Tridiagonal}, ::Val{false}; check::Bool = true) = lu!(A, :none; check=check)
95+
# TODO: remove towards Julia v2
96+
@deprecate lu!(A::Union{StridedMatrix,HermOrSym,Tridiagonal}, ::Val{true}; check::Bool = true) lu!(A, :rowmax; check=check)
97+
@deprecate lu!(A::Union{StridedMatrix,HermOrSym,Tridiagonal}, ::Val{false}; check::Bool = true) lu!(A, :none; check=check)
9898

9999
"""
100100
lu!(A, pivot = :rowmax; check = true) -> LU
@@ -284,9 +284,9 @@ function lu(A::AbstractMatrix{T}, pivot::Symbol = :rowmax; check::Bool = true) w
284284
S = lutype(T)
285285
lu!(copy_oftype(A, S), pivot; check = check)
286286
end
287-
# TODO: remove/deprecate for Julia v2.0
288-
lu(A::AbstractMatrix, ::Val{true}; check::Bool = true) = lu(A, :rowmax; check=check)
289-
lu(A::AbstractMatrix, ::Val{false}; check::Bool = true) = lu(A, :none; check=check)
287+
# TODO: remove for Julia v2.0
288+
@deprecate lu(A::AbstractMatrix, ::Val{true}; check::Bool = true) lu(A, :rowmax; check=check)
289+
@deprecate lu(A::AbstractMatrix, ::Val{false}; check::Bool = true) lu(A, :none; check=check)
290290

291291

292292
lu(S::LU) = S

stdlib/LinearAlgebra/src/qr.jl

+6-5
Original file line numberDiff line numberDiff line change
@@ -307,9 +307,9 @@ Base.@aggressive_constprop function qr!(A::AbstractMatrix, pivot::Symbol = :none
307307
throw(ArgumentError("only `:colnorm` and `:none` are supported as `pivot` argument but you supplied `$pivot`"))
308308
end
309309
end
310-
# TODO: Remove/deprecate towards Julia v2.0
311-
qr!(A::AbstractMatrix, ::Val{true}) = qr!(A, :colnorm)
312-
qr!(A::AbstractMatrix, ::Val{false}) = qr!(A, :none)
310+
# TODO: Remove in Julia v2.0
311+
@deprecate qr!(A::AbstractMatrix, ::Val{true}) qr!(A, :colnorm)
312+
@deprecate qr!(A::AbstractMatrix, ::Val{false}) qr!(A, :none)
313313

314314
_qreltype(::Type{T}) where T = typeof(zero(T)/sqrt(abs2(one(T))))
315315

@@ -397,8 +397,9 @@ Base.@aggressive_constprop function qr(A::AbstractMatrix{T}, arg...; kwargs...)
397397
copyto!(AA, A)
398398
return qr!(AA, arg...; kwargs...)
399399
end
400-
qr(A::AbstractMatrix, ::Val{false}; kwargs...) = qr(A, :none; kwargs...)
401-
qr(A::AbstractMatrix, ::Val{true}; kwargs...) = qr(A, :colnorm; kwargs...)
400+
# TODO: remove in Julia v2.0
401+
@deprecate qr(A::AbstractMatrix, ::Val{false}; kwargs...) qr(A, :none; kwargs...)
402+
@deprecate qr(A::AbstractMatrix, ::Val{true}; kwargs...) qr(A, :colnorm; kwargs...)
402403

403404
qr(x::Number) = qr(fill(x,1,1))
404405
function qr(v::AbstractVector)

0 commit comments

Comments
 (0)