(root, height)
return cluster_list
Return a list of clusters by cutting the clustering at `height`.
Return a list of clusters by cutting the clustering at `height`.
Return a list of clusters by cutting the clustering at height .
def clusters_at_height(root, height):
    """Return a list of clusters by cutting the clustering at `height`.
    """
    lower = set()
    cluster_list = []
    for cl in preorder(root):
        if cl in lower:
            continue
        if cl.value.height < height:
            cluster_list.append(cl)
            lower.update(preorder(cl))
    return cluster_list
def clusters_at_height ( root , height ) : lower = set ( ) cluster_list = [ ] for cl in preorder ( root ) : if cl in lower : continue if cl . value . height < height : cluster_list . append ( cl ) lower . update ( preorder ( cl ) ) return cluster_list