def construct_values

bendtorch-core@0.1.0.0 · src/tensor/core.bend:411

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

411def construct_values(+shape: Shape.Shape, result: Result<&2, &1, Error, Tensor<shape>>) -> Result<&2, &1, Error, Dynamic>:
412  match result:
413    case Fail{error}:
414      Fail{error}
415    case Done{tensor}:
416      Done{pack(shape, tensor)}

Uses (6)

Used by (7)