-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect eigen vectors on symmetric tensors #173
Comments
The implementation is borrowed from StaticArrays, so I guess they have the same issue? JuliaArrays/StaticArrays.jl#694 looks relevant for example. |
Yes, you're correct, it is the same issue (I checked). |
Fixed upstream: julia> using Tensors
julia> a = SymmetricTensor{2, 2, Float64}([0.003 5.8002786937773495e-16 0.003])
2×2 SymmetricTensor{2, 2, Float64, 3}:
0.003 5.80028e-16
5.80028e-16 0.003
julia> eigvecs(a)
2×2 Tensor{2, 2, Float64, 4}:
-0.706987 0.706987
0.707227 0.707227 |
On some 2D symmetric tensors with a diagonal term close but not equal to 0, eigen vectors are not computed correctly and are equal.
The error does not occur on the same, equal, general tensor, see below.
julia>a = SymmetricTensor{2, 2, Float64}([0.003 5.8002786937773495e-16 0.003])
2×2 SymmetricTensor{2, 2, Float64, 3}:
0.003 5.80028e-16
5.80028e-16 0.003
julia> eigvecs(a)
2×2 Tensor{2, 2, Float64, 4}:
0.0 0.0
1.0 1.0
julia> a = Tensor{2, 2, Float64}([0.003 +5.8002786937773495e-16 +5.8002786937773495e-16 0.003])
2×2 Tensor{2, 2, Float64, 4}:
0.003 5.80028e-16
5.80028e-16 0.003
julia> eigvecs(a)
2×2 Matrix{Float64}:
-0.707107 0.707107
0.707107 0.707107
The text was updated successfully, but these errors were encountered: