mlx_graphs.utils.transformations.coalesce#
- mlx_graphs.utils.transformations.coalesce(edge_index: mlx.core.array) mlx.core.array [source]#
Removes duplicate edges in
edge_index
and scatters the duplicate edges to the edge attributes following a given reduction operation (e.g. sum of duplicate edges).