Skip to content

Commit 9c55783

Browse files
authored
Remove unused matrix type params in diag methods (#56048)
These parameters are not used in the method, and are unnecessary for dispatch.
1 parent 38dbd11 commit 9c55783

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

stdlib/LinearAlgebra/src/bidiag.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ function triu!(M::Bidiagonal{T}, k::Integer=0) where T
402402
return M
403403
end
404404

405-
function diag(M::Bidiagonal{T}, n::Integer=0) where T
405+
function diag(M::Bidiagonal, n::Integer=0)
406406
# every branch call similar(..., ::Int) to make sure the
407407
# same vector type is returned independent of n
408408
if n == 0

stdlib/LinearAlgebra/src/diagonal.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ adjoint(D::Diagonal) = Diagonal(adjoint.(D.diag))
751751
permutedims(D::Diagonal) = D
752752
permutedims(D::Diagonal, perm) = (Base.checkdims_perm(axes(D), axes(D), perm); D)
753753

754-
function diag(D::Diagonal{T}, k::Integer=0) where T
754+
function diag(D::Diagonal, k::Integer=0)
755755
# every branch call similar(..., ::Int) to make sure the
756756
# same vector type is returned independent of k
757757
if k == 0

stdlib/LinearAlgebra/src/tridiag.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ issymmetric(S::Tridiagonal) = all(issymmetric, S.d) && all(Iterators.map((x, y)
676676

677677
\(A::Adjoint{<:Any,<:Tridiagonal}, B::Adjoint{<:Any,<:AbstractVecOrMat}) = copy(A) \ B
678678

679-
function diag(M::Tridiagonal{T}, n::Integer=0) where T
679+
function diag(M::Tridiagonal, n::Integer=0)
680680
# every branch call similar(..., ::Int) to make sure the
681681
# same vector type is returned independent of n
682682
if n == 0

0 commit comments

Comments
 (0)