SciPy - Sparse Matrices (scipy.sparse)
What will be the output of this code?
import numpy as np from scipy.sparse import csr_matrix arr = np.array([[0, 0, 3], [4, 0, 0]]) sparse_mat = csr_matrix(arr) print(sparse_mat.data)
