pyhgf.utils.remove_node#

pyhgf.utils.remove_node(attributes, edges, index)[source]#

Remove a given node from the network.

This function removes a node from the network by deleting its parameters in the attributes and edges variables, and adjusts the indices of the remaining nodes.

Parameters:
  • attributes (dict) – The attributes of the network.

  • edges (tuple[AdjacencyLists, ...]) – The edges of the network.

  • index (int) – The index of the node to remove.

Returns:

Updated attributes and edges with the node removed and indices adjusted.

Return type:

tuple[dict, Edges]