def copy_pack
bendtorch-core@0.1.0.0 · src/tensor/transforms.bend:174
import bendtorch-core@0.1.0.0/src/tensor/transforms.bend as Transforms
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/layout.bend as Layout
174def copy_pack(+input: Shape.Shape, +axes: List<&2, U32>, +plan: Layout.Plan<input, axes>,
175 pair: Core.Tensor<input> & Result<&2, &1, Error, Core.Tensor<Layout.output(input, axes, plan)>>) ->
176 Core.Tensor<input> & Result<&2, &1, Error, Core.Dynamic>:
177 (source, result) = pair
178 match result:
179 case Fail{error}:
180 (source, Fail{error})
181 case Done{target}:
182 (source, Done{Core.pack(Layout.output(input, axes, plan), target)})