Home »
Python »
Python SciPy MCQs
What will be the eigen values after run the code?
9. What will be the eigen values after run the code?
from scipy import linalg
import numpy as np
A = np.array([[2,3],[5,6]])
x, y = linalg.eig(A)
print (x)
print (y)
[-0.35889894+0.j 8.35889894+0.j]
[[-0.78609474 -0.4266791]
[0.61810602 -0.90440309]]
[-0.37889894+0.j 8.35889214+0.j]
[[-0.88609474 -0.4266791]
[0.881810602 -0.90440309]]
[-0.55889894+0.j 6.35889894+0.j]
[[-0.68609474 -0.4266791]
[0.51810602 -0.10440309]]
[-0.25889894+0.j 1.35889894+0.j]
[[-0.765609474 -0.4266791]
[0.51810602 -0.50440309]]
Answer: A)
[-0.35889894+0.j 8.35889894+0.j]
[[-0.78609474 -0.4266791]
[0.61810602 -0.90440309]]
Explanation:
Eigen values of the inputted matrix will be:
[-0.35889894+0.j 8.35889894+0.j]
[[-0.78609474 -0.4266791]
[0.61810602 -0.90440309]]