def accepted

bendtorch-core@0.1.0.0 · src/tensor/gather.bend:137

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/slice.bend as Slice

137# The output keeps every axis of the input but `axis`, whose extent becomes
138# the length.
139def accepted(+kind: Lookup, +dimensions: List<&2, U32>, +axis: Nat, +length: Nat) -> Result<&2, &2, Error, Planned>:
140  +output = Slice.resized(dimensions, axis, U32.from_nat(length))
141  shaped(planned_at(kind, dimensions, axis, length), output, Shape.construct(output))

Uses (12)

Used by (3)