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

The attributes of the network.

edges

The edges of the network.

index

The index of the node to remove.

Returns:
Tuple[Dict, Edges]

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

Parameters:
  • attributes (Dict)

  • edges (Tuple[AdjacencyLists, ...])

  • index (int)

Return type:

Tuple[Dict, Tuple[AdjacencyLists, …]]