Skip to content

Commit 75816a7

Browse files
jishnubDrvi
authored andcommitted
Remove unused matrix type params in diag methods (JuliaLang#56048)
These parameters are not used in the method, and are unnecessary for dispatch.
1 parent 9c63250 commit 75816a7

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
@@ -377,7 +377,7 @@ function triu!(M::Bidiagonal{T}, k::Integer=0) where T
377377
return M
378378
end
379379

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

stdlib/LinearAlgebra/src/diagonal.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ adjoint(D::Diagonal) = Diagonal(adjoint.(D.diag))
708708
permutedims(D::Diagonal) = D
709709
permutedims(D::Diagonal, perm) = (Base.checkdims_perm(D, D, perm); D)
710710

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

stdlib/LinearAlgebra/src/tridiag.jl

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

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

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

0 commit comments

Comments
 (0)