has_self_loops
¶
has_self_loops(edge_index: array) -> bool
Function to check for self loops.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
edge_index
|
array
|
Edge index on which to check for self loops. |
required |
Returns:
| Type | Description |
|---|---|
bool
|
A boolean of whether the graph has self loops. |
Example:
Source code in mlx_graphs/utils/transformations.py
from mlx_graphs.utils.transformations import has_self_loops · mlx_graphs/utils/transformations.py