def read_flat
import bendtorch-core@0.1.0.0/src/tensor/signed.bend as Signedimport 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
272# The element at a signed flat index, PyTorch's A.flatten()[index], wrapped
273# among the element count; and the write at it.
274def read_flat(+shape: Shape.Shape, tensor: Core.Tensor<shape>, index: Position) ->
275 Core.Tensor<shape> & Result<&2, &2, Core.Error, F32>:
276 Core.read_flat(shape, tensor, wrap(Shape.count(shape), index))