'Compress rows, cols, vals / summing duplicates. Sort for csc format.'

def compress_csc(self):

    (_, unique, indices) = np.unique((self.rows + (self.n * self.cols)), return_index=True, return_inverse=True)
    self.rows = self.rows[unique]
    self.cols = self.cols[unique]
    self.vals = np.bincount(indices, weights=self.vals)
