mlx_graphs.utils.transformations.to_undirected#
- mlx_graphs.utils.transformations.to_undirected(edge_index: mlx.core.array, edge_features: mlx.core.array | None = None) mlx.core.array | tuple[mlx.core.array, mlx.core.array] [source]#
Converts a graph given as edge_index and, optionally, edge_features to an undirected one.