public static randint(min as Int, max as Int, shape as IList<UInt>) as NDArray<T>:
Creates a new NDArray with random integers.
| Parameter | Description |
|---|---|
min | The minimum value (inclusive). |
max | The maximum value (inclusive). |
shape | The shape of the array. |
A new NDArray with random integers.
a = NDArray<Int>.randint(10, 20, [2u, 3u]) print(a) # Example: [[13, 18, 10], [20, 11, 16]]