Read graph in Pajek format from path.
Parameters : | path : file or string
|
---|---|
Returns : | G : NetworkX MultiGraph or MultiDiGraph. |
References
See http://vlado.fmf.uni-lj.si/pub/networks/pajek/doc/draweps.htm for format information.
Examples
>>> G=nx.path_graph(4)
>>> nx.write_pajek(G, "test.net")
>>> G=nx.read_pajek("test.net")
To create a Graph instead of a MultiGraph use
>>> G1=nx.Graph(G)