(function from pyomo.contrib.pynumero.interfaces.utils)
pyomo.contrib.pynumero.interfaces.utils
Return a sparse matrix CM of ones such that compressed_vector = CM*full_vector based on the compression mask
compression_mask (np.ndarray or pyomo.contrib.pynumero.sparse.block_vector.BlockVector)
cm – The compression matrix
coo_matrix or BlockMatrix