Skip to main content

//clika-runtime/io.clika.runtime/Ops/takeAlongDim

takeAlongDim

[common]
fun takeAlongDim(input: Tensor, index: Tensor, dim: Long? = null): Tensor

takeAlongDim(input: Tensor, index: Tensor, dim: Long? = null): the take_along_dim operator. gather with broadcasting between input 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).