scipy.sparse.coo_matrix. set_shape# coo_matrix.set_shape(shape)[источник]# Установить форму матрицы на месте