def expected_mapped
bendtorch-core@0.1.0.0 · src/tensor/transforms.bend:307
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
307def expected_mapped(-input: Shape.Shape, -axes: List<&2, U32>, -plan: Layout.Plan<input, axes>, -index: U32,
308 source: Core.Tensor<input>, result: Result<&2, &2, Layout.Error, Layout.Mapping<input, axes, plan, index>>) -> Maybe<&2, F32>:
309 match result:
310 case Fail{error}:
311 None{}
312 case Done{mapping}:
313 Core.checked_observe(input, source, Layout.source_index(input, axes, plan, index, mapping))