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