SciPy - Linear Algebra (scipy.linalg)
Identify the error in this code snippet:
from scipy.linalg import inv A = [[1, 2], [3, 4]] A_inv = inv(A)
from scipy.linalg import inv A = [[1, 2], [3, 4]] A_inv = inv(A)
inv() function expects a numpy array or matrix, not a plain Python list.np.array(A) before calling inv().15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions