igraph-help
[Top][All Lists]
Advanced

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

[igraph] Python - indexing Graph object using pair of vertex indices doe


From: cedric . simillion
Subject: [igraph] Python - indexing Graph object using pair of vertex indices doesn't work
Date: Sun, 10 Mar 2013 18:25:48 +0100 (CET)

Hi there!

I just started using the Python igraph module. The online documentation says: "When a graph is indexed by a pair of vertex indices or names, the graph itself is treated as an adjacency matrix and the corresponding cell of the matrix is returned"

Unfortunately, when I try this out, I get an error:
>>> from igraph import *
>>> net = Graph.Erdos_Renyi(100, p = 0.05, directed=True)
>>> net[1,2]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
KeyError: 'Attribute does not exist'

Is this a bug or is something wrong? I'm using Python 2.7.3 on Ubuntu Linux 12.10 64-bit. I've installed igraph from the standard package repository.

All help is appreciated.

Best,
Cedric


reply via email to

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