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

Creates a NDArray with random values in [0, 1) using read-only shape dimensions.

Parameters
ParameterDescription
shapeShape dimensions.
Returns

A random NDArray.

Throws
  • NullException if shape is null at runtime; statically null arguments are rejected with TypeError.
Example
a = NDArray<Double>.random([2, 2])
print(a)