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.PyDiGraph.update_edge_by_index#

PyDiGraph.update_edge_by_index(edge_index, edge, /)#

Update an edge’s weight/payload by the edge index

Parameters:
  • edge_index (int) – The index for the edge

  • edge (object) – The data payload/weight to update the edge with

Raises:

IndexError – when there is no edge present with the provided index