def narrow_started
bendtorch-core@0.1.0.0 · src/tensor/signed.bend:338
import bendtorch-core@0.1.0.0/src/tensor/signed.bend as Signed
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/slice.bend as Slice
338def narrow_started(+shape: Shape.Shape, tensor: Core.Tensor<shape>, +axis: U32, +start: U32, +length: U32, early: Bool) ->
339 Core.Dynamic & Result<&2, &1, Slice.Error, Core.Dynamic>:
340 match early:
341 case False{}:
342 Slice.narrow(Core.Packed{shape, tensor}, axis, start, length)
343 case True{}:
344 narrow_before(Core.Packed{shape, tensor}, Slice.refusal(Shape.dimensions(shape), axis, 1))