How do I find the fielder vector of a Laplacian (L) in Python?
I can get the eigenvalues and eigenvectors using: eigenvalues, eigenvectors = linalg.eig(L)
I assume that python does not return the eigenvalues in an order.
Do I take the 2nd largest eigenvalue and then match it to the corresponding eigenvector (matching in index)?
When ordering the eigenvalues, how do I deal with negative values? Is the ordering by absolute magnitude?
Thanks for your help
evals,evec = np.linalg.eigh(L) ind = np.argsort(evals) evals = evals[ind] evec = evec[:,ind]
– Hirak Sarkar