def slice

stelliferous@0.0.2.0 · tensor_layout.bend:105

import stelliferous@0.0.2.0/tensor_layout.bend as TensorLayout
import Base
import stelliferous@0.0.2.0/tensor.bend as Tensors

105# Elements start, start + step, ... (count of them) along one axis.
106def slice(~Element: Data,tensor: Tensors.Tensor<Element>,axis: U32,start: U32,count: U32,step: U32) -> Tensors.Tensor<Element>:
107  Tensors.with_dense(~Element,~Tensors.Tensor<Element>,tensor,storage => shape => fill => status => workers =>
108    +shape = shape
109    result_of(~Element,slice_view(~Element,sliced(Tensors.view_of(shape),axis,start,count,step),status,storage,shape,fill,workers)))

Uses (7)

Used by (1)