public static random(shape as IList<UInt>) as NDArray<T>:
Creates a new NDArray with random values in [0, 1).
| Parameter | Description |
|---|---|
shape | The shape of the array. |
A new NDArray with random values.
a = NDArray<Double>.random([2u, 2u]) print(a) # Example: [[0.12, 0.98], [0.47, 0.31]]