Hi,
I am having some trouble using the graph.vs vertex sequence. I just want to subselect a few nodes (those with high PR) by node ID.
The following minimal examples show how it breaks for me.
Any help is appreciated.
Tim
import igraph
print igraph.__version__ # 0.6.5
graph = Graph.Full(10)
# graph = focal_subgraph_directed
print list(graph.vs.select(range(4)))
pr_scores = graph.personalized_pagerank()
pr_scores = np.array(pr_scores)
top_indices = np.argsort(-pr_scores)[:10]
print top_indices, len(top_indices)
print list(graph.vs.select(top_indices)) # Why does this not work and return []?
print list(graph.vs.select([1, 3, 5]))
for i in top_indices:
print i, focal_subgraph_directed.vs.select(i) # Why does this throw: invalid vertex filter among positional arguments