SciPy

scipy.sparse.bsr_matrix.set_shape

bsr_matrix.set_shape(shape)[source]