SciPy

scipy.sparse.csc_matrix.set_shape

csc_matrix.set_shape(shape)[source]