def write_flat
bendtorch-core@0.1.0.0 · src/tensor/core.bend:248
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
import bendtorch-core@0.1.0.0/src/storage/main.bend as Storage
248def write_flat(-shape: Shape.Shape, tensor: Tensor<shape>, +i: U32, +value: F32) ->
249 Tensor<shape> & Result<&2, &2, Error, Unit>:
250 TTensor{storage, valid} = tensor
251 write_result(shape, storage, valid, i, value, Storage.set(storage, i, value), {==})