Tensor.win_axes: def of bendtorch@1.3.0.0 Import: import bendtorch@1.3.0.0/tensor.bend as Tensor Lines 306-313 of bendtorch@1.3.0.0/tensor.bend: https://jend.leeeet.dev/read.txt?path=bendtorch@1.3.0.0/tensor.bend&start_line=306&end_line=313 import Base # the index map of reading a tensor of strides st (given by its shape st) at every position of a tensor of shape o, from # a base: axis e has o's size and st's stride (inner(st, e)); the last axis first def win_axes(n: Nat, +o: List<&2, Nat>, +st: List<&2, Nat>, +e: Nat, acc: List<&2, Ax>) -> List<&2, Ax>: match n: case 0n: acc case 1n+p: win_axes(p, o, st, 1n+e, Ax{U32.from_nat(at1(o, e)), U32.from_nat(inner(st, e))} <> acc) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.from_nat https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/tensor.bend&name=Ax https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/tensor.bend&name=at1 https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/tensor.bend&name=inner