Skip to content

Commit

Permalink
Disable sorting of eigenvalues when testing triangular matrices.
Browse files Browse the repository at this point in the history
Fixes #98
  • Loading branch information
andreasnoack authored and haampie committed Dec 17, 2020
1 parent 4205c93 commit 5840175
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions test/collect_eigen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ using LinearAlgebra
R = triu(rand(T, n, n))

# Compute exact eigenvectors according to LAPACK
λs, xs = eigen(R)
if VERSION >= v"1.2.0-DEV.275"
λs, xs = eigen(R, sortby=nothing)
else
λs, xs = eigen(R)
end

# Allocate a complex-valued eigenvector
x = zeros(complex(T), n)
Expand All @@ -38,9 +42,13 @@ rot(θ) = [cos(θ) sin(θ); -sin(θ) cos(θ)]
R = triu(rand(n, n))
R[1:2,1:2] .= rot(1.0) + I
R[10:11,10:11] .= rot(1.2) + 2I

# Compute exact eigenvectors according to LAPACK
λs, xs = eigen(R)
if VERSION >= v"1.2.0-DEV.275"
λs, xs = eigen(R, sortby=nothing)
else
λs, xs = eigen(R)
end

# Allocate a complex-valued eigenvector
x = zeros(ComplexF64, n)
Expand Down

0 comments on commit 5840175

Please sign in to comment.