def select
bendtorch-core@0.1.0.0 · src/tensor/slice.bend:447
import bendtorch-core@0.1.0.0/src/tensor/slice.bend as Slice
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
447
448
449
450def select(input: Core.Dynamic, +dim: U32, +index: U32) -> Core.Dynamic & Result<&2, &1, Error, Core.Dynamic>:
451 Core.Packed{+shape, tensor} = input
452 select_checked(shape, tensor, dim, index, refusal(Shape.dimensions(shape), dim, 1))