Skip to content

Commit

Permalink
LU to Factorization tests (#34905)
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt authored and KristofferC committed Apr 11, 2020
1 parent a6ae534 commit a11ec4f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion stdlib/LinearAlgebra/test/lu.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module TestLU

using Test, LinearAlgebra, Random
using LinearAlgebra: ldiv!, BlasInt, BlasFloat, rdiv!
using LinearAlgebra: ldiv!, BlasReal, BlasInt, BlasFloat, rdiv!

n = 10

Expand Down Expand Up @@ -72,6 +72,12 @@ dimg = randn(n)/2
bft = eltya <: Real ? LinearAlgebra.LU{BigFloat} : LinearAlgebra.LU{Complex{BigFloat}}
bflua = convert(bft, lua)
@test bflua.L*bflua.U big.(a)[p,:] rtol=ε
@test Factorization{eltya}(lua) === lua
# test Factorization with different eltype
if eltya <: BlasReal
@test Array(Factorization{Float16}(lua)) Array(lu(convert(Matrix{Float16}, a)))
@test eltype(Factorization{Float16}(lua)) == Float16
end
end
# compact printing
lstring = sprint(show,l)
Expand Down

0 comments on commit a11ec4f

Please sign in to comment.