SciPy

scipy.sparse.csr_matrix.reshape

csr_matrix.reshape(shape)[source]