Python wrappers
Public Python APIs implemented by this engine symbol.Index a with a flat index list: .
Composite over reshape_op + gather_op. The input is
flattened to a 1-D view first so the index dimension is unambiguous;
gradient flows back through GatherBackward (scatter-add) and
ReshapeBackward.
Math
where maps the linear index into a's row-major
coordinates.
See Also
index_select_op — keeps the original rank instead of flattening.
Parameters
aTensorImplPtrSource tensor of arbitrary shape.
indicesTensorImplPtrInteger tensor (
int32 or int64) of arbitrary shape; each element is a flat-index into a.Returns
TensorImplPtrTensor of the same shape as indices and dtype of a.
Raises
FailureIf either input is null, or if
indices is not an integer dtype.Notes
Out-of-bounds indices are forwarded verbatim to gather_op — behaviour
matches the underlying primitive's bounds policy.