law select_axis_refused

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

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/layout.bend as Layout
import bendtorch-core@0.1.0.0/src/tensor/slice.bend as Slice

315law select_axis_refused:
316  for input: Core.Dynamic
317  for +dim: U32
318  for +index: U32
319  for outside: {Nat.is_lt(U32.to_nat(dim), rank_of(input)) == False{} : Bool}
320  {Slice.select(input, dim, index) == (input, Fail{Slice.LayoutError{Layout.AxisOutOfBounds{}}}) :
321    Core.Dynamic & Result<&2, &1, Slice.Error, Core.Dynamic>}

Uses (17)

Used by (0)

No other definition uses this definition.