[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] problem with get_eid with neighbors
From: |
Tamas Nepusz |
Subject: |
Re: [igraph] problem with get_eid with neighbors |
Date: |
Mon, 6 Apr 2009 20:39:13 +0100 |
Hi Simone,
Apparently you have hit a bug in the Python interface :( The exception
happens when in_nei is empty; in this case, g.vs[in_nei] is still the
complete VertexSeq of the graph instead of an empty VertexSeq. I'll
try to commit a fix soon; in the meanwhile, check explicitly if in_nei
is empty:
for node in g.vs:
in_nei = g.neighbors(node.index, type="in")
if not in_nei: continue
for vicino in g.vs[in_nei]:
if vicino["color"] == "blue":
eid = g.get_eid(vicino.index, node.index, directed=True)
Best,
--
Tamas