def construct_shape
bendtorch-core@0.1.0.0 · src/tensor/core.bend:418
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
418def construct_shape(-dimensions: List<&2, U32>, values: List<&2, F32>, result: Shape.ConstructResult<dimensions>) ->
419 Result<&2, &1, Error, Dynamic>:
420 match result:
421 case Shape.SError{error}:
422 Fail{ShapeError{error}}
423 case Shape.SBuilt{+shape, preserved}:
424 construct_values(shape, from_values(shape, values))