SciPy - Sparse Matrices (scipy.sparse)
What will be the output of the following code?
import numpy as np from scipy.sparse import csr_matrix arr = np.array([[0, 1], [2, 0]]) sparse_mat = csr_matrix(arr) result = sparse_mat.dot(np.array([1, 2])) print(result.toarray())
