In scipy.sparse.linalgyou have a function eigsand eigshthat use ARPACK-library . You can read more in this tutorial , but if it a's a square matrix, possibly in a sparse format, then you can get its largest value, an eigenvalue, i.e. its eigenvalue Perron-Frobenius, and the corresponding eigenvector as:
val, vec = scipy.sparse.linalg.eigs(a, k=1, which='LM')
source
share