get_src_dst_features
¶
get_src_dst_features(
edge_index: array, node_features: Union[array, tuple[array, array]]
) -> tuple[array, array]
Extracts source and destination node features based on the given edge indices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
edge_index
|
array
|
a [2, num_edges] array representing the source and target nodes of each edge |
required |
node_features
|
Union[array, tuple[array, array]]
|
The input array of node features. |
required |
Returns:
| Type | Description |
|---|---|
tuple[array, array]
|
A tuple containing source and destination features. |
Source code in mlx_graphs/utils/transformations.py
from mlx_graphs.utils.transformations import get_src_dst_features · mlx_graphs/utils/transformations.py