SciPy - Sparse Linear Algebra
What will be the output of the following code snippet?
import numpy as np from scipy.sparse import csc_matrix from scipy.sparse.linalg import splu A = csc_matrix([[3, 0, 0], [0, 4, 0], [0, 0, 5]]) lu = splu(A) print(lu.L.toarray())
