Home:ALL Converter>Python-IGraph Attributes

Python-IGraph Attributes

Ask Time:2019-03-19T06:33:00         Author:Gokce Dilek

Json Formatter

I am looking into converting some code from Python NetworkX to Python-IGraph. When adding nodes and edges to a graph, NetworkX very easily allows you to do: g.add_node(a[0], n=a[1]) where a[0] is the node label and a[1] is the value of the attribute "n". How can we add attributes to a node and similarly to an edge, when creating them with Python-IGraph? Thank you!

Author:Gokce Dilek,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/55231044/python-igraph-attributes
yy