Which NumPy function is used to calculate the eigenvalues and eigenvectors of a square matrix?
Correct answer
C. np.linalg.eig()
13 views
C. np.linalg.eig()
13 views
np.linalg.eig() returns the eigenvalues and eigenvectors of a square matrix.
np.linalg.solve() solves a linear system, np.linalg.det() gives the determinant and np.linalg.inv() the inverse. For symmetric matrices np.linalg.eigh() is faster and more accurate.
For more solved questions like this one, see Data Science MCQs on MCQsExam.com.
Not sure why the answer is C? Ask here and get an explanation.