invert_sqrt_degree
¶
Computes the inverted square root of the degree array.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
degree
|
array
|
Array of length num_nodes with the inverted square root degree of each node. |
required |
Returns:
| Type | Description |
|---|---|
array
|
Array of length |
array
|
each node with 'inf' values zeroed out. |
Source code in mlx_graphs/utils/scatter.py
from mlx_graphs.utils.scatter import invert_sqrt_degree · mlx_graphs/utils/scatter.py