TensorView.slice_axes: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_view.bend as TensorView Lines 196-203 of stelliferous@0.0.2.0/tensor_view.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor_view.bend&start_line=196&end_line=203 import Base import stelliferous@0.0.2.0/tensor_shape.bend as Shapes def slice_axes(axes: List<&2,Axis>,axis: Nat,+start: U32,+count: U32,+step: U32,+offset: U32) -> Maybe<&2,View>: match axes axis: case Con{Axis{size,+stride},tail} 0n: sliced_axis(slice_step(U32.is_zero(step),start,count,step,size),count,Shapes.checked_multiply(stride,step), add_offset(Shapes.checked_multiply(start,stride),offset),tail) case Con{head,tail} 1n+rest: prepend_axis(Some{head},slice_axes(tail,rest,start,count,step,offset)) case Nil{} axis: None{} Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_zero https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_shape.bend&name=checked_multiply https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_view.bend&name=Axis https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_view.bend&name=View https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_view.bend&name=add_offset https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_view.bend&name=prepend_axis https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_view.bend&name=slice_step https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_view.bend&name=sliced_axis