4/02/2012

scipy 0.7 to 0.9 arpack interface change

http://docs.scipy.org/doc/scipy-0.9.0/reference/release.0.9.0.html?highlight=arpack#arpack-interface-changes


Other changes

ARPACK interface changes

The interface to the ARPACK eigenvalue routines in scipy.sparse.linalg was changed for more robustness.
The eigenvalue and SVD routines now raise ArpackNoConvergence if the eigenvalue iteration fails to converge. If partially converged results are desired, they can be accessed as follows:
import numpy as np
from scipy.sparse.linalg import eigs, ArpackNoConvergence

m = np.random.randn(30, 30)
try:
    w, v = eigs(m, 6)
except ArpackNoConvergence, err:
    partially_converged_w = err.eigenvalues
    partially_converged_v = err.eigenvectors
Several bugs were also fixed.
The routines were moreover renamed as follows:
  • eigen –> eigs
  • eigen_symmetric –> eigsh
  • svd –> svds

댓글 없음: