Am 04.10.18 um 07:08 schrieb ashutosh: > *import graph_tool as gt* > > *gt.centrality.eigenvector(myGraph)* > > gives the following error: > > *AttributeError: module 'graph_tool' has no attribute 'centrality'*
In Python, you must first import a module before it can be used. Thus before using graph_tool.centrality.eigenvector, you must do: import graph_tool.centrality As is explained in the graph-tool documentation, the library includes the graph_tool.all submodule that includes every function. Thus you can also do import graph_tool.all as gt and then use directly gt.eigenvector(). Best, Tiago -- Tiago de Paula Peixoto <[email protected]>
signature.asc
Description: OpenPGP digital signature
_______________________________________________ graph-tool mailing list [email protected] https://lists.skewed.de/mailman/listinfo/graph-tool
