mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
scatter axis + gather axis primitives (#1813)
* scatter axis + gather axis primitives * add transforms * comment
This commit is contained in:
@@ -968,6 +968,14 @@ array put_along_axis(
|
||||
int axis,
|
||||
StreamOrDevice s = {});
|
||||
|
||||
/** Add the values into the array at the given indices along the axis */
|
||||
array scatter_add_axis(
|
||||
const array& a,
|
||||
const array& indices,
|
||||
const array& values,
|
||||
int axis,
|
||||
StreamOrDevice s = {});
|
||||
|
||||
/** Scatter updates to the given indices.
|
||||
*
|
||||
* The parameters ``indices`` and ``axes`` determine the locations of ``a``
|
||||
|
||||
Reference in New Issue
Block a user