On Sat, Nov 8, 2008 at 1:27 PM, Tamas Nepusz
<address@hidden> wrote:
Hi Shrijeet,
import igraph
newgraph = igraph.Graph()
f="adjmat.txt"
newgraph.Read_Adjacency(f,"edge")
Read_Adjacency is a static method of the Graph object, therefore you shouldn't call it on a Graph instance that you constructed in the second line. If you want to create a graph from an adjacency matrix stored in a file, you should do it as follows:
from igraph import *
g = Graph.Read_Adjacency("adjmat.txt")
It is even easier using the load() function:
from igraph import *
g = load("adjmat.txt", format="adjacency")
This works with igraph 0.5.1, so in case you are still getting error messages, please check the version number of your igraph installation:
import igraph
print igraph.__version__
--
Tamas
_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help