def gather
bendtorch-core@0.1.0.0 · src/tensor/gather.bend:442
import bendtorch-core@0.1.0.0/src/tensor/gather.bend as Gather
import Base
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/signed.bend as Signed
442
443def gather(input: Core.Dynamic, dim: Signed.Position, +index: Index) -> Core.Dynamic & Result<&2, &1, Error, Core.Dynamic>:
444 Core.Packed{+shape, tensor} = input
445 Index{+index_shape, +entries} = index
446 copied(shape, tensor, entries, gather_plan(shape, dim, Index{index_shape, entries}))