broadcast
¶
broadcast(src: array, other: array, dim: int) -> array
Make the shape broadcastable between arrays src and other. May be required in some situations like index broadcasting.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
src
|
array
|
source array to broadcast. |
required |
other
|
array
|
other array to match the shape. |
required |
Returns:
| Type | Description |
|---|---|
array
|
Array with new broadcastable shape. |
Source code in mlx_graphs/utils/array_ops.py
from mlx_graphs.utils.array_ops import broadcast · mlx_graphs/utils/array_ops.py