scipy.sparse
csr_matrix.
set_shape
See reshape.
reshape
scipy.sparse.csr_matrix.rint
scipy.sparse.csr_matrix.setdiag