scatter_mean
¶
Computes the mean of values that are scattered along a specified axis, grouped by index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
values
|
array
|
Input array containing values to be scattered. These values will undergo a scatter and mean operation. |
required |
index
|
array
|
Array containing indices that determine the scatter of the |
required |
out_size
|
int
|
Size of the output array. |
required |
axis
|
int
|
Axis along which to scatter. |
0
|
Returns:
| Type | Description |
|---|---|
array
|
An array containing mean of |
Source code in mlx_graphs/utils/scatter.py
from mlx_graphs.utils.scatter import scatter_mean · mlx_graphs/utils/scatter.py