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