Note

This is the documentation for the current state of the development branch of rustworkx. The documentation or APIs here can change prior to being released.

rustworkx.PyGraph.add_nodes_from#

PyGraph.add_nodes_from(obj_list, /)#

Add new nodes to the graph.

Parameters:

obj_list (iterable) – An iterable of python object to attach to the graph.

Returns indices:

A list of int indices of the newly created nodes

Return type:

NodeIndices