Skip to content

Commit 32b89e6

Browse files
committed
Work around issue with the alg keyword in svd!
1 parent 45d8095 commit 32b89e6

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/svd.jl

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,13 @@ function LinearAlgebra.svdvals!(A::StridedMatrix; tol = eps(real(eltype(A))), de
467467
end
468468

469469
# FixMe! The full keyword is redundant for Bidiagonal and should be removed from Base
470-
LinearAlgebra.svd!(B::Bidiagonal{T}; tol = eps(T), full = false, debug = false) where T<:Real = _svd!(B, tol = tol, debug = debug)
470+
LinearAlgebra.svd!(B::Bidiagonal{T};
471+
tol = eps(T),
472+
full = false,
473+
# To avoid breaking on <Julia 1.3, the `alg` keyword doesn't do anything. Once we drop support for Julia 1.2
474+
# and below, we can make the keyword argument work correctly
475+
alg = nothing,
476+
debug = false) where T<:Real = _svd!(B, tol = tol, debug = debug)
471477

472478
"""
473479
svd!(A[, tol, full, debug])::SVD
@@ -488,7 +494,13 @@ A generic singular value decomposition (SVD). The implementation only uses Julia
488494
```jldoctest
489495
```
490496
"""
491-
function LinearAlgebra.svd!(A::StridedMatrix{T}; tol = eps(real(eltype(A))), full = false, debug = false) where T
497+
function LinearAlgebra.svd!(A::StridedMatrix{T};
498+
tol = eps(real(eltype(A))),
499+
full = false,
500+
# To avoid breaking on <Julia 1.3, the `alg` keyword doesn't do anything. Once we drop support for Julia 1.2
501+
# and below, we can make the keyword argument work correctly
502+
alg = nothing,
503+
debug = false) where T
492504

493505
m, n = size(A)
494506

0 commit comments

Comments
 (0)