Hello, This has been discussed on the list before; unfortunately VertexDendrogram.as_clustering() freaks out if the dendrogram is not complete, which may happen with certain graph clustering methods if your initial graph is disconnected (because these methods won't try to merge the disconnected components at the end). A temporary solution is to postprocess the dendrogram a bit so it becomes complete; see this thread for more details:
https://lists.nongnu.org/archive/html/igraph-help/2014-02/msg00067.html Best, T. On 10/26, xiao wu wrote: > I am new to igraph and use python igraph 0.6.5 in ubuntu python 2.7. I have > my own pajek file I loaded into python, and ran community detection algorithm > and got the following dendrogram > > >>> print(dendrogram)Dendrogram, 1335 elements, 314 merges > But when I tried to run as_clusting, I got the following error: > >>> clusters = dendrogram.as_clustering()Traceback (most recent call last): > >>> File "<stdin>", line 1, in <module> File > >>> "/usr/lib/python2.7/dist-packages/igraph/clustering.py", line 959, in > >>> as_clustering num_elts - n)igraph._igraph.InternalError: Error at > >>> community.c:767: `steps' to big or `merges' matrix too short, Invalid > >>> value > How do I debug from here? My pajek file's Vertices are not continuous. Would > that create a problem? > Thanks, > Xiao > > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help -- T. _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
