Index
/*
Indexing operation on ragged tensor
@param [in] src Source ragged tensor to index
@param [in] axis Axis to index `src` on, must satisfy
0 <= src < src.NumAxes().
@param [in] indexes Array of indexes, which will be interpreted
as indexes into axis `axis` of `src`,
i.e. with 0 <= indexes[i] < src.TotSize(axis).
As a special case, if axis == 0 we also support
-1 as an index, which will result in the
empty list (as if it were the index into
a position in `src` that had an empty list
at that point).
CAUTION: these are currently not allowed to
change the order on axes less than `axis`,
i.e. if axis > 0, we require.
`IsMonotonic(src.RowIds(axis)[indexes])`.
@param [out] If non-null, this will be set to an
Array1<int32\_t> containing the indexes
into the elements of an array with shape
would have (a new2old map). As in:
`ans\_values = src\_values[*elem\_indexes]`.
If `axis == src.NumAxes()-1`, this will
be aliased with `indexes`.
@return Returns a ragged shape with
`ans.NumAxes() == src.NumAxes()`
and `ans.TotSize(axis) == indexes.Dim()`.
NOET: if you are looking for something like ReorderRaggedShape(),
RenumberRaggedShape() or the like, this may be what you want.
(Reordering/renumbering is a special case of indexing)
*/