def axis

bendtorch-core@0.1.0.0 · src/tensor/gather_LAWS.bend:21

import bendtorch-core@0.1.0.0/src/tensor/gather_LAWS.bend as GatherLAWS
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/signed.bend as Signed

21# The axis a request names: its signed dim wrapped among the input's rank.
22def axis(+input: Shape.Shape, dim: Signed.Position) -> Nat:
23  U32.to_nat(Signed.wrap(Shape.rank(input), dim))

Uses (6)

Used by (9)