def word_inside

bendtorch-core@0.1.0.0 · src/tensor/read_contract.bend:19

import bendtorch-core@0.1.0.0/src/tensor/read_contract.bend as ReadContract
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape

19def word_inside(+shape: Shape.Shape, +index: U32, inside: {Nat.is_lt(U32.to_nat(index), Shape.logical_numel(Shape.dimensions(shape))) == True{} : Bool}) ->
20  {Nat.is_lt(U32.to_nat(index), U32.to_nat(Shape.count(shape))) == True{} : Bool}:
21  %Equal.sym(Nat, U32.to_nat(Shape.count(shape)), Shape.logical_numel(Shape.dimensions(shape)), count_exact(shape)) : {Nat.is_lt(U32.to_nat(index), _) == True{} : Bool}
22  inside

Uses (11)

Used by (17)