×
×
Correct!
Insert the missing method to delete the zero values from the array:
import numpy as np
from scipy.sparse import csr_matrix
arr = np.array([[0, 0, 0], [0, 0, 1], [1, 0, 2]])
mat = csr_matrix(arr)
mat.@(15)()
print(mat)
import numpy as np
from scipy.sparse import csr_matrix
arr = np.array([[0, 0, 0], [0, 0, 1], [1, 0, 2]])
mat = csr_matrix(arr)
mat.eliminate_zeros()
print(mat)
Not CorrectClick here to try again. Correct! |
This will reset the score of ALL 20 exercises.
Are you sure you want to continue?