TensorLayout.pad_edge_axis: def of stelliferous@0.0.2.0 Import: import stelliferous@0.0.2.0/tensor_layout.bend as TensorLayout Lines 501-507 of stelliferous@0.0.2.0/tensor_layout.bend: https://jend.leeeet.dev/read.txt?path=stelliferous@0.0.2.0/tensor_layout.bend&start_line=501&end_line=507 import Base import stelliferous@0.0.2.0/tensor.bend as Tensors def pad_edge_axis(~Element: Data,unchanged: Bool,tensor: Tensors.Tensor,+axis: U32,+before: U32,+after: U32) -> Tensors.Tensor: match unchanged: case True{}: tensor case False{}: Tensors.then(~Tensors.Tensor,~Tensors.Tensor,~Tensors.Tensor,edge_strip(~Element,tensor,axis,False{},before),first => tensor => Tensors.then(~Tensors.Tensor,~Tensors.Tensor,~Tensors.Tensor,edge_strip(~Element,tensor,axis,True{},after),last => tensor => concat(~Element,Tensors.Cons{first,Tensors.Cons{tensor,Tensors.Single{last}}},axis))) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor.bend&name=Parts https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor.bend&name=Tensor https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor.bend&name=then https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_layout.bend&name=concat https://jend.leeeet.dev/definition.txt?path=stelliferous@0.0.2.0/tensor_layout.bend&name=edge_strip