SciPy - Sparse Linear Algebra
Given the following code, what will be the shape of the matrix
U returned by svds?
import numpy as np from scipy.sparse.linalg import svds from scipy.sparse import csr_matrix A = csr_matrix(np.array([[1, 0, 0], [0, 2, 0], [0, 0, 3]])) U, S, Vt = svds(A, k=2)
