I would like to get eigenvectors of a sparse symmetric matrix with the best precision affordable in a given time.
Currently I use the following with scipy.sparse.eigsh
:
evals, evecs = eigsh(MyMatrix, 2,which='LM' ,tol=1.e-15, maxiter=1000000)
If it does not converge to tol
precision by maxiter
iterations, it raises an ArpackNoConvergence
error which contains the eigenvectors/values that have converged, but not the ones that did not. Yet, I prefer to have the vector with precision 1.e-14
instead of 1.e-15
rather than no vector at all. Is there a way to force returning the eigenvectors that have not converged yet (perhaps with another library) ?
Like in Matlab, where the eigs
function returns the eigenvectors anyway, with just an additional Warning if the desired precision is not reached.
Thanks !