BatchedMatmul.stretch: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/batched_matmul.bend as BatchedMatmul Lines 237-244 of bendtorch-core@0.1.0.0/src/tensor/batched_matmul.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/batched_matmul.bend&start_line=237&end_line=244 import Base # Index `index` of a batch axis of `extent`: the index itself, or 0 where the # extent is 1 and stretches. def stretch(+index: Nat, one: Bool) -> Nat: match one: case True{}: 0n case False{}: index Uses (2): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat