def plan_ranked
bendtorch-core@0.1.0.0 · src/tensor/layout.bend:154
import bendtorch-core@0.1.0.0/src/tensor/layout.bend as Layout
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
154def plan_ranked(+input: Shape.Shape, +axes: List<&2, U32>,
155 decision: Shape.BoolCase<Nat.is_eq(Shape.rank_dimensions(axes), Shape.rank_dimensions(Shape.dimensions(input)))>) ->
156 Result<&2, &2, Error, Plan<input, axes>>:
157 match decision:
158 case Shape.BFalse{equal}:
159 Fail{AxesLengthMismatch{}}
160 case Shape.BTrue{equal}:
161 plan_bounded(input, axes, Shape.bool_case(bounded(axes, Shape.rank(input))))