klyn.math.NDArray.random
method
public static random(shape as IList<UInt>) as NDArray<T>:
Description

Creates a new NDArray with random values in [0, 1).

Parameters
  • shape The shape of the array.
Returns

A new NDArray with random values. a = NDArray<Double>.random([2u, 2u]) print(a) # Example: [[0.12, 0.98], [0.47, 0.31]]