×
×
Correct!
Insert the missing method to convert from csr (Compressed Sparse Row) to csc (Compressed Sparse Column):
import numpy as np
from scipy.sparse import csr_matrix
arr = np.array([[0, 0, 0], [0, 0, 1], [1, 0, 2]])
newarr = csr_matrix(arr).tocsc()
Not CorrectClick here to try again. Correct!import numpy as np from scipy.sparse import csr_matrix arr = np.array([[0, 0, 0], [0, 0, 1], [1, 0, 2]]) newarr = csr_matrix(arr).() |