law gather_shape_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/signed.bend as Signed
import bendtorch-core@0.1.0.0/src/tensor/gather.bend as Gather
149law gather_shape_refused:
150 for +input: Shape.Shape
151 for +dim: Signed.Position
152 for +index: Shape.Shape
153 for +entries: List<&2, U32>
154 for counted: {Nat.is_eq(length(entries), Shape.elements(index)) == True{} : Bool}
155 for in_rank: {Nat.is_lt(axis(input, dim), rank(input)) == True{} : Bool}
156 for ranked: {Nat.is_eq(Shape.rank_dimensions(Shape.dimensions(index)), rank(input)) == True{} : Bool}
157 for unmatched: {others(Shape.dimensions(input), Shape.dimensions(index), axis(input, dim)) == False{} : Bool}
158 {Gather.gather_plan(input, dim, Gather.Index{index, entries}) == Fail{Gather.IndexShapeMismatch{}} :
159 Result<&2, &2, Gather.Error, Gather.Planned>}
Uses (26)
Used by (0)
No other definition uses this definition.