igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Edges and nodes attributes in python


From: Justin McCann
Subject: Re: [igraph] Edges and nodes attributes in python
Date: Wed, 8 Feb 2012 19:53:50 -0500

> On Wed, Feb 8, 2012 at 6:50 PM, kaledje blaise <address@hidden> wrote:
>> Hi
>>
>> Is it possible to get and set nodes and edges attributes with the python
>> interface?

First, please excuse my original top-post. Second, I hit send too soon.

If you want to set/update attributes, you can use
   v['attrname'] = value
or just
   variable = v['attrname']

And the same thing works for edges, too.

If you want to just read attributes, you can use something like
   attr = v.attributes()
and then look in attr, but it doesn't help for updating the attributes
on the vertex/edge, and it really doesn't buy you anything.

     Justin



reply via email to

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