What does the np.linalg.inv() function do in NumPy?
-
A
Computes the determinant of a matrix
-
B
Computes the inverse of a matrix
Correct answer
-
C
Computes the eigenvalues of a matrix
-
D
Computes the singular value decomposition (SVD) of a matrix
Correct answer
B. Computes the inverse of a matrix
16 views
Explanation
The np.linalg.inv() function calculates the inverse of a square matrix. It is commonly used in linear algebra and solving systems of linear equations.
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ