File tree 2 files changed +12
-5
lines changed
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
210
210
issymmetric (A:: Hermitian{<:Complex} ) = isreal (A)
211
211
issymmetric (A:: Symmetric ) = true
212
212
transpose (A:: Symmetric ) = A
213
+ transpose (A:: Hermitian{<:Real} ) = A
213
214
ctranspose (A:: Symmetric{<:Real} ) = A
214
215
function ctranspose (A:: Symmetric )
215
216
AC = ctranspose (A. data)
Original file line number Diff line number Diff line change @@ -93,14 +93,20 @@ let n=10
93
93
@test ishermitian (Symmetric (b + b' ))
94
94
end
95
95
96
- # transpose, ctranspose
96
+ # transpose, ctranspose
97
+ S = Symmetric (asym)
98
+ H = Hermitian (asym)
97
99
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
99
104
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
101
109
end
102
- @test ctranspose (Symmetric (asym)) == Symmetric (conj (asym))
103
- @test ctranspose (Hermitian (asym)) == asym
104
110
105
111
# tril/triu
106
112
for di in - n: n
You can’t perform that action at this time.
0 commit comments