klyn.math.NDArray.setFlat
method
public setFlat(index as Long, value as T) as Void
Description

Writes an element by its row-major linear index without reshaping the array.

Parameters
ParameterDescription
indexLinear element index; negative indices count from the end.
valueNew element value.
Throws
  • IndexException outside the array.
Example

images.setFlat(0, 1.0f)