From 8b050e1a3db16801aa5995ad80d9438d04bf711b Mon Sep 17 00:00:00 2001 From: Sacha Verweij Date: Fri, 22 Sep 2017 00:45:09 -0700 Subject: [PATCH] Replace a few simple, unambiguous uses of full. (#23815) --- base/linalg/schur.jl | 2 +- base/linalg/special.jl | 2 +- base/linalg/triangular.jl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base/linalg/schur.jl b/base/linalg/schur.jl index e53741108596b..fe4dce5d408ab 100644 --- a/base/linalg/schur.jl +++ b/base/linalg/schur.jl @@ -109,7 +109,7 @@ schur(A::Symmetric) = schur(full(A)) schur(A::Hermitian) = schur(full(A)) schur(A::UpperTriangular) = schur(full(A)) schur(A::LowerTriangular) = schur(full(A)) -schur(A::Tridiagonal) = schur(full(A)) +schur(A::Tridiagonal) = schur(Matrix(A)) """ diff --git a/base/linalg/special.jl b/base/linalg/special.jl index d41078fe2a238..c5a67beb8637c 100644 --- a/base/linalg/special.jl +++ b/base/linalg/special.jl @@ -65,7 +65,7 @@ function convert(::Type{Tridiagonal}, A::SymTridiagonal) end function convert(::Type{Diagonal}, A::AbstractTriangular) - if full(A) != diagm(diag(A)) + if !isdiag(A) throw(ArgumentError("matrix cannot be represented as Diagonal")) end Diagonal(diag(A)) diff --git a/base/linalg/triangular.jl b/base/linalg/triangular.jl index 69d2be62633dc..f0ab6b86ce9b4 100644 --- a/base/linalg/triangular.jl +++ b/base/linalg/triangular.jl @@ -1434,7 +1434,7 @@ end ## for these cases, but I'm not sure it is worth it. for t in (UpperTriangular, UnitUpperTriangular, LowerTriangular, UnitLowerTriangular) @eval begin - (*)(A::Tridiagonal, B::$t) = A_mul_B!(full(A), B) + (*)(A::Tridiagonal, B::$t) = A_mul_B!(Matrix(A), B) end end