SciPy
dok_matrix.set_shape
Set the shape of the matrix in-place
previous
scipy.sparse.dok_matrix.resize
next
scipy.sparse.dok_matrix.setdiag