klyn.math.NDArray.NDArray
constructor
public NDArray(notnull values as IList<T>)
Description

Copies a list of values into a new 1D NDArray, including an empty vector. The list length determines the shape; values are never dimensions.

Parameters
ParameterDescription
valuesSource values, copied independently of the list.
Throws
  • NullException if values is null at runtime; statically null arguments are rejected with TypeError.
Example
a = NDArray<Int>([3, 4])  # Two values, shape [2].
print(a[1])              # 4