def unflatten_spec

bendtorch-core@0.1.0.0 · src/shape/LAWS.bend:85

import bendtorch-core@0.1.0.0/src/shape/LAWS.bend as LAWS
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape

85def unflatten_spec(+dims: List<&2, Nat>, index: Maybe<&2, Shape.Fin(Shape.numel(dims))>) -> Maybe<&2, List<&2, U32>>:
86  match index:
87    case None{}:
88      None{}
89    case Some{index}:
90      Some{Shape.words(Shape.indices(dims, Shape.unflatten(dims, index)))}

Uses (9)

Used by (5)