law index_select_axis_refused
import bendtorch-core@0.1.0.0/src/tensor/gather_LAWS.bend as GatherLAWSimport 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
88# index_select(dim, index): an axis outside -rank..rank-1 is refused first,
89# then an entry at or past the extent; any other request is planned.
90law index_select_axis_refused:
91 for +input: Shape.Shape
92 for +dim: Signed.Position
93 for +entries: List<&2, U32>
94 for outside: {Nat.is_lt(axis(input, dim), rank(input)) == False{} : Bool}
95 {Gather.select_plan(input, dim, entries) == Fail{Gather.LayoutError{Layout.AxisOutOfBounds{}}} :
96 Result<&2, &2, Gather.Error, Gather.Planned>}
Uses (16)
Used by (0)
No other definition uses this definition.