SciPy - Integration with Scientific Ecosystem
Consider the following code snippet:
What will be the output printed?
from scipy.sparse import csr_matrix, save_npz, load_npz
import numpy as np
arr = np.array([[0, 0, 1], [1, 0, 0], [0, 2, 0]])
sp = csr_matrix(arr)
save_npz('matrix.npz', sp)
loaded_sp = load_npz('matrix.npz')
print(loaded_sp.toarray())What will be the output printed?
