form_edge_matrix#
- cinnabar.stats.form_edge_matrix(graph: Graph, label: str, step=None, action: Literal['symmetrize', 'antisymmetrize'] | None = 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 ({“symmetrize”, “antisymmetrize”} | None, 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 (str | None, default None) – Diagonal will be occupied with absolute values, where labeled.
- Return type:
matrix