module index
Tensor subscripting: x.i(0), x.i(2..5), x.i((.., 0, 1..3)); one
entry per dimension, combining integers, ranges, boolean masks, index
tensors, Ellipsis and NewAxis. f_i is the
Result form; i panics on a runtime failure.
An integer entry selects (and removes) the dimension; a range keeps it;
NewAxis inserts a size-1 dimension; Ellipsis expands to full slices
over the unnamed middle dimensions. Indexed tensors stay valid; the
operation reads through shared handles.
use clika_rt::IndexOp;
let x = api.tensor_full(&[4, 6], 1.0, f32_)?;
let row = x.f_i(0)?; // shape [6]
let cols = x.f_i((.., 1..4))?; // shape [4, 3]
Ellipsis (struct)
Expands to full slices over the dimensions no other entry names.
Implements: IndexEntry
NewAxis (struct)
Inserts a size-1 dimension at its position.
Implements: IndexEntry
IndexEntry (trait)
One dimension's index entry. Implemented for integers, ranges, bool
masks, index tensors, Ellipsis and NewAxis.
IndexOp (trait)
Subscript a tensor with a single entry or a tuple of entries.