def dynamic_point_result

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

import bendtorch-core@0.1.0.0/src/tensor/read_contract.bend as ReadContract
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/observation.bend as Observation

211def dynamic_point_result(+shape: Shape.Shape, +index: U32, result: Result<&2, &1, Core.Error, Core.Tensor<shape>>) ->
212  {Observation.dynamic_point(shape, index, result) == Observation.point(shape, index, result) : Maybe<&2, F32>}:
213  match result:
214    case Fail{error}:
215      {==}
216    case Done{tensor}:
217      Core.dynamic_result_value(shape, Core.read_flat(shape, tensor, index))

Uses (11)

Used by (1)