ClikaRT::ops::take_along_dim
function
take_along_dim()
gather with broadcasting between x and index on the other dims.
With dim absent both operands are treated as flattened 1-D. Same index dtype law as gather (Int32/Int64).
Parameters
x: the source.index: integer positions; broadcasts againstxoff the chosen dim.dim: the addressed axis; absent = flattened. Default: absent.
Throws
ClikaRT::Error: (INVALID_ARGUMENT) when the shapes do not broadcast or the index dtype is wrong (code_name()carries the reason).
Returns: a new tensor of the broadcast shape, dtype of x.
Declared in ClikaRT/compute/ops.h, line 2419