Skip to main content

//clika-runtime/io.clika.runtime/Ops/take

take

[common]
fun take(self: Tensor, index: Tensor): Tensor

take(self: Tensor, index: Tensor): the take operator. Read elements of self at FLAT (row-major linearized) positions. self is treated as flattened 1-D: out[..] = self.flat[index[..]]. The output takes index's shape and self's dtype. Index dtype law as gather.