Slice.view_at: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/slice.bend as Slice Lines 77-84 of bendtorch-core@0.1.0.0/src/tensor/slice.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/slice.bend&start_line=77&end_line=84 import Base import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape def view_at(dimensions: List<&2, U32>, +dim: Nat, +outer: Nat) -> View: match dimensions dim: case extent <> rest 0n: View{outer, U32.to_nat(extent), Shape.logical_numel(rest)} case extent <> rest 1n+next: view_at(rest, next, Nat.mul(outer, U32.to_nat(extent))) case Nil{} _: View{outer, 0n, 1n} Uses (7): 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=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=logical_numel https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/slice.bend&name=View