scipy.sparse
dok_matrix.
set_shape
See reshape.
reshape
scipy.sparse.dok_matrix.resize
scipy.sparse.dok_matrix.setdefault