Check If Matrix Is Diagonal Python, eig(A) # eigen values and vectors D = N.