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