import numpy as np
import numpy.linalg as linalg
P = np.array([[2, 0, 0], [0, 1, 0], [0, 0, 3]])
D, V = linalg.eig(P)
print(D)
How do I find out eigenvectors corresponding to a particular eigenvalue of a matrix?