[graph-tool] Re: property map values are not loaded for .graphml graph
Am 28.06.21 um 20:48 schrieb bnikp...@gmail.com: Hi, I have saved a graph in Networkx with .graphml format. I can successfully load the graph in graph-tool and I can see the edge property attached to graph. However, when I try to access the values I get an error that the property does not exist. G = gt.load_graph('gdrive/MyDrive/ColabNotebooks/Thesis/sources/k4p3-2-test.graphml') G.properties {('e', '_graphml_edge_id'): , ('e', 'etype'): , ('v', '_graphml_vertex_id'): } e = G.edges().next() etype[e] NameError: name 'etype' is not defined You seem unfamiliar with the Python syntax. In Python, objects need to be declared before they are used. The correct way to obtain the property map would have been: etype = G.ep["etype"] etype[e] -- Tiago de Paula Peixoto ___ graph-tool mailing list -- graph-tool@skewed.de To unsubscribe send an email to graph-tool-le...@skewed.de
[graph-tool] property map values are not loaded for .graphml graph
Hi, I have saved a graph in Networkx with .graphml format. I can successfully load the graph in graph-tool and I can see the edge property attached to graph. However, when I try to access the values I get an error that the property does not exist. G = gt.load_graph('gdrive/MyDrive/ColabNotebooks/Thesis/sources/k4p3-2-test.graphml') G.properties {('e', '_graphml_edge_id'): , ('e', 'etype'): , ('v', '_graphml_vertex_id'): } e = G.edges().next() etype[e] NameError: name 'etype' is not defined ___ graph-tool mailing list -- graph-tool@skewed.de To unsubscribe send an email to graph-tool-le...@skewed.de
[graph-tool] Re: Problem on bipartite-networks with label
Dear Filippo, This has been fixed in the newest release (2.41), thanks for the bug report. (In the future, it is enough just to open an issue in the website, as you did. There is no need to post an additional message to the mailing list.) Best, Tiago Am 27.06.21 um 09:06 schrieb filippo.va...@edu.unito.it: I am using [SBMtopicmodeling](https://github.com/martingerlach/hSBM_Topicmodel) to inference partition on bipartite networks After a recent graph-tool update I noticed there is a problem with **state_args** in minimize_nested_blockmodel_dl step to reproduce: given a trivial bi-partite network, with VertexProperty **kind** that imposes the bi-partition clabel = g.vp['kind'] state_args = {} state = gt.minimize_nested_blockmodel_dl(g, state_args=state_args) finds partitions but when I impose bi-partition clabel = model.g.vp['kind'] state_args = {'clabel': clabel, 'pclabel': clabel} state = gt.minimize_nested_blockmodel_dl(g, state_args=state_args) it fails to find any partition. What could be the problem? ___ graph-tool mailing list -- graph-tool@skewed.de To unsubscribe send an email to graph-tool-le...@skewed.de -- Tiago de Paula Peixoto ___ graph-tool mailing list -- graph-tool@skewed.de To unsubscribe send an email to graph-tool-le...@skewed.de