Hi there!
Due to certain limitations, we are trying to install the graphtool version 2.7 on a redhat distribution. After a lot of fidling around, we have been able to make the functions we need work, except for the find_edge_range function.
The following simple example demonstrates the problem:
from graph_tool.all import *
g = Graph() v1, v2 = g.add_vertex(), g.add_vertex() e1,e2 = g.add_edge(v1,v2), g.add_edge(v2,v1) res = g.new_edge_property("double") res[e1] = 0.1 res[e2] = 12. eList = find_edge_range(g,res, [0.0, 1.])
This causes the following issue: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/graph_tool/util/__init__.py", line 84, in find_edge_range convert = converter(prop.value_type()) NameError: global name 'converter' is not defined
Unfortunately, I have not found a way to see the actual code, where this error arises. Was this a problem in that particular version? What do I need to do to find the code where this issue arises?
The following python loop is able to reproduce the desired behavior, but it is way too slow: eList = [] for e in g.edges(): if res[e] <= eps and res[e] >= 0.0: eList.append(e)
Is there a more efficient way to do this, if I cannot make "find_edge_range" work?
Looking forward to hearing from you. All the best,
Alex
Am 06.08.2018 um 10:28 schrieb Hobé Alex:
Hi there!
Due to certain limitations, we are trying to install the graphtool version 2.7 on a redhat distribution.
This is an ancient version, of three years ago, twenty iterations behind the current one.
Unfortunately, I have not found a way to see the actual code, where this error arises. Was this a problem in that particular version? What do I need to do to find the code where this issue arises?
It is an utterly pointless exercise to debug old versions, specially ancient ones, since they have already been debugged, and thus became newer versions.
The following python loop is able to reproduce the desired behavior, but it is way too slow: eList = [] for e in g.edges(): if res[e] <= eps and res[e] >= 0.0: eList.append(e)
Is there a more efficient way to do this, if I cannot make "find_edge_range" work?
Just use the newest version.
Best, Tiago