@@ -582,13 +582,21 @@ end
582582
583583# bug identified in PR #52318: dot products of quaternionic Hermitian matrices,
584584# or any number type where conj(a)*conj(b) ≠ conj(a*b):
585- @testset " dot Hermitian quaternion #52318 " begin
586- A, B = [Quaternion . (randn (3 , 3 ), randn ( 3 , 3 ), randn ( 3 , 3 ), randn ( 3 , 3 )) |> t -> t + t' for i in 1 : 2 ]
585+ @testset " dot Hermitian quaternion" begin
586+ A, B = [(randn (Quaternion{Float64}, 4 , 4 )) |> t -> t + t' for i in 1 : 2 ]
587587 @test A == Hermitian (A) && B == Hermitian (B)
588588 @test dot (A, B) ≈ dot (Hermitian (A), Hermitian (B))
589- A, B = [Quaternion . (randn (3 , 3 ), randn ( 3 , 3 ), randn ( 3 , 3 ), randn ( 3 , 3 )) |> t -> t + transpose (t) for i in 1 : 2 ]
589+ A, B = [(randn (Quaternion{Float64}, 4 , 4 )) |> t -> t + transpose (t) for i in 1 : 2 ]
590590 @test A == Symmetric (A) && B == Symmetric (B)
591591 @test dot (A, B) ≈ dot (Symmetric (A), Symmetric (B))
592+ A = randn (Quaternion{Float64}, 4 , 4 )
593+ x = randn (Quaternion{Float64}, 4 )
594+ y = randn (Quaternion{Float64}, 4 )
595+ for t in (Symmetric, Hermitian), uplo in (:U , :L )
596+ M = t (A, uplo)
597+ N = Matrix (M)
598+ @test dot (x, M, y) ≈ dot (x, N, y)
599+ end
592600end
593601
594602# let's make sure the analogous bug will not show up with kronecker products
0 commit comments