form_edge_matrix#

cinnabar.stats.form_edge_matrix(graph: Graph, label: str, step=None, action=None, node_label=None) ndarray[source]#

Extract the labeled property from edges into a matrix.

Parameters:
  • graph (nx.Graph) – The graph to extract data from

  • label (str) – The label to use for extracting edge properties

  • action (str, optional, default=None) – If ‘symmetrize’, returns a symmetric matrix A[i,j] = A[j,i] If ‘antisymmetrize’, returns an antisymmetric matrix A[i,j] = -A[j,i]

  • node_label (sr, optional, default=None) – Diagonal will be occupied with absolute values, where labelled

Return type:

matrix