klyn.math.NDArray.set
method
public set(i as Int, value as T) as Void:
Description

Sets one element in a 1D NDArray.

Parameters
  • i Element index.
  • value New value.
Example
a = NDArray<Int>.zeros([4u])
a.set(2, 7)
print(a[2])