|
From: | Gábor Csárdi |
Subject: | Re: [igraph] Efficiently selecting a node in python igraph |
Date: | Fri, 9 May 2014 20:41:46 -0400 |
Hi,what is the proper way to efficiently select a node in python igraph?I want to do something like:- find node object based on keyword attribute- add new node to graph (add_vertex) [since this returns none I need to "find" the new node obj]- add edge between both nodesCurrently this is very slow. Any tips?%timeit g.vs.find(paper_id_eq=paper_id)%timeit g.add_edge(paper_id_node, new_node)# G has 20k nodes and 100k edges10 loops, best of 3: 450 ms per loop10 loops, best of 3: 84.1 ms per loopThanks,Tim
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
[Prev in Thread] | Current Thread | [Next in Thread] |