[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Subgraph with attributes

From: Thomas Glickson
Subject: [igraph] Subgraph with attributes
Date: Mon, 22 Jul 2013 16:35:41 -0400

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. 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]