scipy.cluster
scipy.cluster.hierarchy
DisjointSet.
connected
Test whether x and y are in the same subset.
Elements to test.
True if x and y are in the same set, False otherwise.
scipy.cluster.hierarchy.DisjointSet.merge
scipy.cluster.hierarchy.DisjointSet.subset