Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Mapping eigen value to eigen vector
eigen_pairs = [(np.abs(eigen_vals[i]), eigen_vecs[:,i]) for i in range(len(eigen_vals))]
# Sort the (eigenvalue, eigenvector) tuples from high to low
# check if the value is decreasing
print([e[0] for e in eigen_pairs])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment