|
From: | Николай Кинаш |
Subject: | Re: [igraph] igraph-help Digest, Vol 102, Issue 13 |
Date: | Thu, 15 Jan 2015 09:35:11 +0900 |
Message: 4
Date: Wed, 14 Jan 2015 21:36:54 +0900
From: ??????? ????? <address@hidden>
To: address@hidden
Subject: [igraph] Save vertex property
Message-ID:
<address@hidden>
Content-Type: text/plain; charset="utf-8"
Hello
>>> graph = ig.Graph()
>>> graph.add_vertex()
>>> graph.vs[0]["age"] = 55
>>> graph.vs[0]["age"]
55
>>> graph = ig.Graph().Barabasi(graph.vcount()+3, 3, power=2.5,
start_from=graph, outpref=True)
>>> graph.vs[0]["age"]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: 'Attribute does not exist'
It is possible to save "age" property after ig.Graph().Barabasi ?
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nongnu.org/archive/html/igraph-help/attachments/20150114/ec7e0025/attachment.html>
------------------------------
Message: 5
Date: Wed, 14 Jan 2015 15:09:50 +0100
From: Tamas Nepusz <address@hidden>
To: Help for igraph users <address@hidden>
Subject: Re: [igraph] Save vertex property
Message-ID: <address@hidden>
Content-Type: text/plain; charset=us-ascii
> >>> graph = ig.Graph().Barabasi(graph.vcount()+3, 3, power=2.5,
> ... start_from=graph, outpref=True)
I'm quite surprised that it works at all to be honest. The correct invocation
would be:
ig.Graph.Barabasi(graph.vcount()+3, 3, power=2.5, ...)
Graph.Barabasi is a class method so it must be invoked directly on the Graph
class, not on a Graph instance. Can you repeat your code with the above
modification and check if the issue still persists?
All the best,
T.
------------------------------
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help
End of igraph-help Digest, Vol 102, Issue 13
********************************************
[Prev in Thread] | Current Thread | [Next in Thread] |