~/bend-docscommunity

src/tensor/transpose_spec.bend checks

raw source on the hub · import bendtorch-core@0.1.0.0/src/tensor/transpose_spec.bend as Transpose_spec

3 imports
import Base
import ../shape/core.bend as Shape
import ./axis_spec.bend as Axis

Definitions

def axis_limit source · line 5 · raw

@rank:Nat -> Nat

def axes_valid source · line 12 · raw

@+rank:Nat -> @+a:Nat -> @+b:Nat -> Bool

def valid source · line 15 · raw

@+shape:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+a:U32 -> @+b:U32 -> Bool

def replace source · line 18 · raw

@-A:Data -> @items:List<&2, A> -> @index:Nat -> @+value:A -> List<&2, A>

def swap_selected source · line 27 · raw

@-A:Data -> @+items:List<&2, A> -> @+a:Nat -> @+b:Nat -> @left:Maybe<&2, A> -> @right:Maybe<&2, A> -> List<&2, A>

def swap source · line 34 · raw

@-A:Data -> @+items:List<&2, A> -> @+a:Nat -> @+b:Nat -> List<&2, A>

def natural_axes source · line 38 · raw

@+rank:Nat -> @+a:Nat -> @+b:Nat -> List<&2, Nat>

def requested_axes source · line 41 · raw

@+rank:Nat -> @+a:Nat -> @+b:Nat -> List<&2, U32>

def swapped_axes source · line 46 · raw

@+input:0x1689e5deb278c16abd3bd45eac101ef3/src/shape/core.Shape -> @+a:U32 -> @+b:U32 -> List<&2, U32>

The permutation transpose_copy(input, a, b) runs: the identity of the input's rank with axes a and b swapped.