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.get_edge_data#

PyGraph.get_edge_data(node_a, node_b, /)#

Return the edge data for the edge between 2 nodes.

Note if there are multiple edges between the nodes only one will be returned. To get all edge data objects use get_all_edge_data()

Parameters:
  • node_a (int) – The index for the first node

  • node_b (int) – The index for the second node

Returns:

The data object set for the edge

Raises:

NoEdgeBetweenNodes – when there is no edge between the provided nodes