mlx_graphs.utils.transformations.remove_self_loops#
- mlx_graphs.utils.transformations.remove_self_loops(edge_index: mlx.core.array, edge_features: mlx.core.array | None = None) mlx.core.array | tuple[mlx.core.array, mlx.core.array] [source]#
Removes self-loops from the given graph represented by edge_index and edge_features.
- Parameters:
- Return type:
- Returns:
A tuple containing the updated edge_index and edge_features without self-loops.