igraph-help
[Top][All Lists]
Advanced

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

[igraph] disjoint_union and vertex attribute


From: Николай Кинаш
Subject: [igraph] disjoint_union and vertex attribute
Date: Thu, 12 Jun 2014 23:10:18 +0900

Hi!

#!/usr/bin/env python
import igraph as ig
import numpy as np

random = ig.Graph.Erdos_Renyi(100, 0.2)
random.vs["owner"] = "random"

bara = ig.Graph.Barabasi(100, 2)
bara.vs["owner"] = "bara"

graphs = [random, bara]

graph_union = ig.Graph().disjoint_union( graphs )

print graph_union.vs["owner"]


Traceback (most recent call last):
File "model.py", line 17, in <module>
print graph_union.vs["owner"]
KeyError: 'Attribute does not exist'

Why graph_union does not have "owner" attribute?

Thanks.

   

reply via email to

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