Edges get reindexed starting from 0. If you want to refer to the same edge, you must use an attribute such as a 'name' one, which is a string that will be searched for if you do, say g.es['10']
M Il giorno 23/lug/2013 04:53, "Thomas Glickson" <[email protected]> ha scritto: > Hi all, > > I'm having a little trouble with the subgraph_edges command. See the > following snippet of code: > > print g.es[0]['weight'] # prints 1223 which happens to be the edge weight > of edge 0 > g_sub = g.subgraph_edges(edge_incidents) # create a subgraph > print g_sub.es[0]['weight'] # prints None > > The problem is that none of my edge attributes are transferring onto the > subgraph. No, it's not that all of the ids in my edge list "edge_incidents" > have 'weight' attribute None. This happens for all edge attributes (I have > a dozen) for all edges in the subgraph. I know edge attributes aren't > supposed to disappear, because they don't when I test it on a simple graph. > Am I missing something here? Any help or suggestions about what might be > causing the problem are much appreciated. > > Thomas > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help > >
_______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
