SciPy - Sparse Linear Algebra
Identify the error in this code using
cg solver:import numpy as np from scipy.sparse.linalg import cg A = np.array([[0, 1], [1, 0]]) b = np.array([1, 2]) x, info = cg(A, b) print(x)
