def written_value

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

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

105def written_value(-shape: Shape.Shape, +index: U32, +value: F32, +other: U32,
106  result: Result<&2, &1, Core.Error, Core.Tensor<shape>>) -> Maybe<&2, F32>:
107  match result:
108    case Fail{error}:
109      None{}
110    case Done{tensor}:
111      written_value_pair(shape, other, Core.write_flat(shape, tensor, index, value))

Uses (9)

Used by (7)