File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
stdlib/LinearAlgebra/test Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -418,12 +418,18 @@ end
418418@testset " convert between eltypes" begin
419419 a = rand (Float64, 10 , 5 )
420420 qra = qr (a)
421- @test Array (LinearAlgebra. QRCompactWY {Float32} (qra. factors, qra. T)) ≈ Array (qr (Float32 .(a)))
421+ qrwy = LinearAlgebra. QRCompactWY {Float32} (qra. factors, qra. T)
422+ @test Array (qrwy) ≈ Array (qr (Float32 .(a)))
423+ @test eltype (qrwy. factors) == eltype (qrwy. T) == Float32
422424 qra = qr (a, ColumnNorm ())
423- @test Array (QRPivoted {Float32} (qra. factors, qra. τ, qra. jpvt)) ≈ Array (qr (Float32 .(a), ColumnNorm ()))
425+ qrp = QRPivoted {Float32} (qra. factors, qra. τ, qra. jpvt)
426+ @test Array (qrp) ≈ Array (qr (Float32 .(a), ColumnNorm ()))
427+ @test eltype (qrp. factors) == eltype (qrp. τ) == Float32
424428 a = rand (Float16, 10 , 5 )
425429 qra = qr (a)
426- @test Array (QR {ComplexF16} (qra. factors, qra. τ)) ≈ Array (qr (ComplexF16 .(a)))
430+ qrnonblas = QR {ComplexF16} (qra. factors, qra. τ)
431+ @test Array (qrnonblas) ≈ Array (qr (ComplexF16 .(a)))
432+ @test eltype (qrnonblas. factors) == eltype (qrnonblas. τ) == ComplexF16
427433end
428434
429435end # module TestQR
You can’t perform that action at this time.
0 commit comments