[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] igraph - pyhton interface <<error while using Read_Adjacenc

From: Shrijeet Paliwal
Subject: Re: [igraph] igraph - pyhton interface <<error while using Read_Adjacency method in Graph>>
Date: Sat, 8 Nov 2008 13:58:14 -0500

Hi Tamas,
That was too naive of me, I am beginning with Python, pardon me please.

Your inputs solved the problem. It was both, they way I accessed the method, as well as the version issue (i was with older version).

I had heard of igraph's incredible community from some one who pointed me to this library. I just had an experience.

to iterate is human,to recurse divine.

On Sat, Nov 8, 2008 at 1:27 PM, Tamas Nepusz <address@hidden> wrote:
Hi Shrijeet,

import igraph
newgraph = igraph.Graph()
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__


igraph-help mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]