We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5f3a99 commit e2833ceCopy full SHA for e2833ce
stdlib/LinearAlgebra/test/qr.jl
@@ -415,4 +415,15 @@ end
415
@test A.Q' * B ≈ A.Q
416
end
417
418
+@testset "convert between eltypes" begin
419
+ a = rand(Float64, 10, 5)
420
+ qra = qr(a)
421
+ @test Array(LinearAlgebra.QRCompactWY{Float32}(qra.factors, qra.T)) ≈ Array(qr(Float32.(a)))
422
+ qra = qr(a, ColumnNorm())
423
+ @test Array(QRPivoted{Float32}(qra.factors, qra.τ, qra.jpvt)) ≈ Array(qr(Float32.(a), ColumnNorm()))
424
+ a = rand(Float16, 10, 5)
425
426
+ @test Array(QR{ComplexF16}(qra.factors, qra.τ)) ≈ Array(qr(ComplexF16.(a)))
427
+end
428
+
429
end # module TestQR
0 commit comments