klyn.math.NDArray.randint
method
public static randint(min as T, max as T, shape as IList<Int>) as NDArray<T>:
Description
Creates a NDArray with random integers in `[min, max]` using read-only shape dimensions.
a = NDArray<Int>.randint(0, 5, [2, 3])
print(a)
Parameters
  • min Lower bound (inclusive).
  • max Upper bound (inclusive).
  • shape Shape dimensions.
Returns
A random NDArray. ```klyn a = NDArray<Int>.randint(0, 5, [2, 3]) print(a) ```