Skip to content

Instantly share code, notes, and snippets.

@tanveer-sayyed
Last active May 12, 2019 15:37
Show Gist options
  • Save tanveer-sayyed/2ac57ba1db970394cdcf1065039fe094 to your computer and use it in GitHub Desktop.
Save tanveer-sayyed/2ac57ba1db970394cdcf1065039fe094 to your computer and use it in GitHub Desktop.
changed name
Q = np.array([[0, -1], [1, 0]]) # All REAL numbers
print('Asymmetry check: \n', Q == -np.transpose(Q) )
lambdas, eigenVectors = np.linalg.eig(Q)
eigenVectors = Scaling_Eigen_Vectors(eigenVectors= eigenVectors)
print('lambdas: \n', lambdas)
print('eigenvectors: \n', eigenVectors)
Output:
Asymmetry check:
[[ True True]
[ True True]]
lambdas:
[0.+1.j 0.-1.j]
eigenvectors:
[[1.+0.j 1.-0.j]
[0.-1.j 0.+1.j]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment