law gather_axis_refused

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

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/layout.bend as Layout
import bendtorch-core@0.1.0.0/src/tensor/signed.bend as Signed
import bendtorch-core@0.1.0.0/src/tensor/gather.bend as Gather

128law gather_axis_refused:
129  for +input: Shape.Shape
130  for +dim: Signed.Position
131  for +index: Shape.Shape
132  for +entries: List<&2, U32>
133  for counted: {Nat.is_eq(length(entries), Shape.elements(index)) == True{} : Bool}
134  for outside: {Nat.is_lt(axis(input, dim), rank(input)) == False{} : Bool}
135  {Gather.gather_plan(input, dim, Gather.Index{index, entries}) == Fail{Gather.LayoutError{Layout.AxisOutOfBounds{}}} :
136    Result<&2, &2, Gather.Error, Gather.Planned>}

Uses (22)

Used by (0)

No other definition uses this definition.