law select_out_of_range

bendtorch-core@0.1.0.0 · src/tensor/slice_LAWS.bend:307

import bendtorch-core@0.1.0.0/src/tensor/slice_LAWS.bend as SliceLAWS
import Base
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/slice.bend as Slice

307law select_out_of_range:
308  for input: Core.Dynamic
309  for +dim: U32
310  for +index: U32
311  for inside: {Nat.is_lt(U32.to_nat(dim), rank_of(input)) == True{} : Bool}
312  for past: {Nat.is_lt(U32.to_nat(index), extent_of(input, dim)) == False{} : Bool}
313  {Slice.select(input, dim, index) == (input, Fail{Slice.OutOfRange{}}) : Core.Dynamic & Result<&2, &1, Slice.Error, Core.Dynamic>}

Uses (19)

Used by (0)

No other definition uses this definition.