I'm trying to get a type-stable output from a symmetric sparse eigenvalue 
problem.

Any ideas why neither of these ideas work to give me a deterministic return 
of Array{Float64,1} ?

n = 500; A = sparse(1:n-1,2:n,1.,n,n); A = A + A'
@show issym(A)
function myeig1(A::SparseMatrixCSC{Float64,Int64})
   d,V = eigs(A;tol=1e-4)
   return d
end

function myeig2(A::SparseMatrixCSC{Float64,Int64})
   d,V = eigs(Symmetric(A);tol=1e-4)
   return d
end

@code_warntype myeig1(A)
@code_warntype myeig2(A)

Thanks,
David Gleich

Reply via email to