(simplicial_set, reset_local_metric=False)
return simplicial_set
Reset the local connectivity requirement -- each data sample should
    have complete confidence in at least one 1-simplex in the simplicial set.
    We can enforce this by locally rescaling confidences, and then remerging the
    different local simplicial sets together.

    Parameters
    ----------
    simplicial_set: sparse matrix
        The simplicial set for which to recalculate with respect to local
        connectivity.

    Returns
    -------
    simplicial_set: sparse_matrix
        The recalculated simplicial set, now with the local connectivity
        assumption restored.
Reset the local connectivity requirement -- each data sample should
    have complete confidence in at least one 1-simplex in the simplicial set.
    We can enforce this by locally rescaling confidences, and then remerging the
    different local simplicial sets together.
Reset the local connectivity requirement -- each data sample should have complete confidence in at least one 1 - simplex in the simplicial set . We can enforce this by locally rescaling confidences and then remerging the different local simplicial sets together .
def reset_local_connectivity(simplicial_set, reset_local_metric=False):
    """Reset the local connectivity requirement -- each data sample should
    have complete confidence in at least one 1-simplex in the simplicial set.
    We can enforce this by locally rescaling confidences, and then remerging the
    different local simplicial sets together.

    Parameters
    ----------
    simplicial_set: sparse matrix
        The simplicial set for which to recalculate with respect to local
        connectivity.

    Returns
    -------
    simplicial_set: sparse_matrix
        The recalculated simplicial set, now with the local connectivity
        assumption restored.
    """
    simplicial_set = normalize(simplicial_set, norm="max")
    if reset_local_metric:
        simplicial_set = simplicial_set.tocsr()
        reset_local_metrics(simplicial_set.indptr, simplicial_set.data)
        simplicial_set = simplicial_set.tocoo()
    transpose = simplicial_set.transpose()
    prod_matrix = simplicial_set.multiply(transpose)
    simplicial_set = simplicial_set + transpose - prod_matrix
    simplicial_set.eliminate_zeros()

    return simplicial_set
def reset_local_connectivity ( simplicial_set , reset_local_metric = False ) : simplicial_set = normalize ( simplicial_set , norm = "max" ) if reset_local_metric : simplicial_set = simplicial_set . tocsr ( ) reset_local_metrics ( simplicial_set . indptr , simplicial_set . data ) simplicial_set = simplicial_set . tocoo ( ) transpose = simplicial_set . transpose ( ) prod_matrix = simplicial_set . multiply ( transpose ) simplicial_set = simplicial_set + transpose - prod_matrix simplicial_set . eliminate_zeros ( ) return simplicial_set