Ferrite-FEM / Ferrite-FEM/Tensors.jl
adjoint implementation inconsistent with `Matrix` for complex numbers
- Dominant language
- Julia
- Stars
- 182
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
TLDR: `transpose(c) != adjoint(c)` if `eltype(c) isa Complex`
We don't apply `adjoint` on the elements, should we? E.g. `adjoint(::Vec}` was removed, but in that case `adjoint(::Vec{dim, ComplexF64})` would make sense...
```julia
julia> tc = rand(Tensor{2,2,Complex{Float64}})
2×2 Tensor{2, 2, ComplexF64, 4}:
0.0479967+0.733511im 0.76812+0.222008im
0.977339+0.873173im 0.0240781+0.100997im
julia> tc' ⋅ tc
2×2 Tensor{2, 2, ComplexF64, 4}:
-0.342975+1.77718im -0.190633+0.693812im
-0.190633+0.693812im 0.5311+0.34592im
julia> mc = collect(tc);
julia> mc' * mc
2×2 Matrix{ComplexF64}:
2.25796+0.0im 0.311432-0.475085im
0.311432+0.475085im 0.650076+0.0im
julia> transpose(mc) * mc
2×2 Matrix{ComplexF64}:
-0.342975+1.77718im -0.190633+0.693812im
-0.190633+0.693812im 0.5311+0.34592im
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.