(clusters, values)
return clusters_w_vals
Combine cluster indices in <clusters> (as returned from find_clusters_1d_break_dist) with the respective values
    in <values>.
    Return list of tuples, each tuple representing a cluster and containing two NumPy arrays:
    1. cluster indices into <values>, 2. values of this cluster
Combine cluster indices in <clusters> (as returned from find_clusters_1d_break_dist) with the respective values
    in <values>.
    Return list of tuples, each tuple representing a cluster and containing two NumPy arrays:
    1. cluster indices into <values>, 2. values of this cluster
Combine cluster indices in <clusters > ( as returned from find_clusters_1d_break_dist ) with the respective values in <values > . Return list of tuples each tuple representing a cluster and containing two NumPy arrays : 1 . cluster indices into <values > 2 . values of this cluster
def zip_clusters_and_values(clusters, values):
    """
    Combine cluster indices in <clusters> (as returned from find_clusters_1d_break_dist) with the respective values
    in <values>.
    Return list of tuples, each tuple representing a cluster and containing two NumPy arrays:
    1. cluster indices into <values>, 2. values of this cluster
    """
    if type(values) is not np.ndarray:
        raise TypeError("values must be a NumPy array")
    
    clusters_w_vals = []
    for c_ind in clusters:
        c_vals = values[c_ind]
        clusters_w_vals.append((c_ind, c_vals))
    
    return clusters_w_vals
def zip_clusters_and_values ( clusters , values ) : if type ( values ) is not np . ndarray : raise TypeError ( "values must be a NumPy array" ) clusters_w_vals = [ ] for c_ind in clusters : c_vals = values [ c_ind ] clusters_w_vals . append ( ( c_ind , c_vals ) ) return clusters_w_vals