def gather_counted
bendtorch-core@0.1.0.0 · src/tensor/gather.bend:189
import bendtorch-core@0.1.0.0/src/tensor/gather.bend as Gather
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
189def gather_counted(+dimensions: List<&2, U32>, +axis: Nat, +index: List<&2, U32>, +entries: List<&2, U32>, exact: Bool) ->
190 Result<&2, &2, Error, Planned>:
191 match exact:
192 case False{}:
193 Fail{TensorError{Core.ValueCountMismatch{}}}
194 case True{}:
195 gather_axis(dimensions, axis, index, entries, Nat.is_lt(axis, Shape.rank_dimensions(dimensions)))