On 08.10.2015 13:49, Yogesh Karpate wrote:
After compilation of 40 Hours on my laptop, I have just begun working with graph-tool.
If it takes 40 hours to compile, it means that your system is running out of memory and swapping. If you make sure the compilation has sufficient memory, it should take far less than that.
I have installed graph-tool-2.9 and my interest lies in finding minimum spanning tree of a graph ..so just tried following code
import numpy as np from graph_tool.all import * g, pos = triangulation(np.random((500, 2)) * 4, type="delaunay") tree = min_spanning_tree(g) graph_draw(g, pos=pos, edge_color=tree, output="min_tree.pdf")
It throws error "
g, pos = triangulation(np.random((500, 2)) * 4, type="delaunay") TypeError: 'module' object is not callable "
When I do, g, pos = gt.triangulation(np.random((400, 2)) * 10, type="delaunay") It shows the error
NameError: name 'gt' is not defined
Is gt python alias for graph_tool?
This is mentioned in the very beginning of the documentation. https://graph-tool.skewed.de/static/doc/graph_tool.html#how-to-use-the-docum... In short: The docstring examples assume that graph_tool.all has been imported as gt: >>> import graph_tool.all as gt Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>