set_diagonal

set_diagonal(tnet, val=0)[source]

Generally diagonal is set to 0. This function helps set the diagonal across time.

Parameters:
  • tnet (array) – temporal network (graphlet)
  • val (value to set diagonal to (default 0)) –
Returns:

tnet – Graphlet representation with new diagonal

Return type:

array