File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,7 @@ issymmetric(A::Hermitian{<:Real}) = true
210210issymmetric (A:: Hermitian{<:Complex} ) = isreal (A)
211211issymmetric (A:: Symmetric ) = true
212212transpose (A:: Symmetric ) = A
213+ transpose (A:: Hermitian{<:Real} ) = A
213214ctranspose (A:: Symmetric{<:Real} ) = A
214215function ctranspose (A:: Symmetric )
215216 AC = ctranspose (A. data)
Original file line number Diff line number Diff line change @@ -93,14 +93,20 @@ let n=10
9393 @test ishermitian (Symmetric (b + b' ))
9494 end
9595
96- # transpose, ctranspose
96+ # transpose, ctranspose
97+ S = Symmetric (asym)
98+ H = Hermitian (asym)
9799 if eltya <: Real
98- @test transpose (Symmetric (asym)) == asym
100+ @test transpose (S) === S == asym
101+ @test ctranspose (S) === S == asym
102+ @test transpose (H) === H == asym
103+ @test ctranspose (H) === H == asym
99104 else
100- @test transpose (Hermitian (asym)) == transpose (asym)
105+ @test transpose (S) === S
106+ @test ctranspose (S) == Symmetric (conj (asym))
107+ @test transpose (H) == Hermitian (transpose (asym))
108+ @test ctranspose (H) === H == asym
101109 end
102- @test ctranspose (Symmetric (asym)) == Symmetric (conj (asym))
103- @test ctranspose (Hermitian (asym)) == asym
104110
105111 # tril/triu
106112 for di in - n: n
You can’t perform that action at this time.
0 commit comments