graphicle.data.AdjacencyList.to_sparse(data: ndarray[Any, dtype[Any]] | None = None) coo_array[source]

Converts the graph structure to a scipy.sparse.coo_array instance.

New in version 0.1.11.

Parameters:
data : ndarray, optional

Data stored on each edge. If None, these will be boolean values indicating whether the outgoing node is a leaf. Default is None.

Returns:

COO-formatted sparse array, where rows are "src" and cols are "dst" indices for AdjacencyList.edges.

Return type:

coo_array


Last update: Jun 27, 2025