[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] Possible bug in python "find()" command?
From: |
Nick Eubank |
Subject: |
[igraph] Possible bug in python "find()" command? |
Date: |
Tue, 23 Dec 2014 05:32:32 +0000 |
Hi All,
I've been working with a relatively large graph, and have been having some trouble with the find() command. In particular, I'm finding the following two commands run at very, very different speeds (on a toy graph with 100,000 users and 1,000,000 nodes -- my actual graph has same problem, but is 100x larger).
Blazing fast:
for i in g.vs['name']:
g.vs.find(i)
Very, very slow :
for i in g.vs['name']:
g.vs.find(name = i)
And yes, all names are strings, so this isn't the case one is querying by index and the other by names.
Is there a reason why? My understanding was taht these were supposed to be equivalent (as suggested in the tutorial -
http://igraph.org/python/doc/tutorial/tutorial.html ). I can work around, but wasn't sure if this was a bug or not, so thought I'd bring it up!
Thanks!
Nick
- [igraph] Possible bug in python "find()" command?,
Nick Eubank <=