cunumeric.random.random_integers#

cunumeric.random.random_integers(low, high=None, size=None)#

Random integers of type np.int_ between low and high, inclusive.

Return random integers of type np.int_ from the “discrete uniform” distribution in the closed interval [low, high]. If high is None (the default), then results are from [1, low]. The np.int_ type translates to the C long integer type and its precision is platform dependent.

This function has been deprecated. Use randint instead.

Parameters:
  • low (int) – Lowest (signed) integer to be drawn from the distribution (unless high=None, in which case this parameter is the highest such integer).

  • high (int, optional) – If provided, the largest (signed) integer to be drawn from the distribution (see above for behavior if high=None).

  • size (int or tuple of ints, optional) – Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. Default is None, in which case a single value is returned.

Returns:

outsize-shaped array of random integers from the appropriate distribution, or a single such random int if size not provided.

Return type:

int or ndarray of ints

Availability:

Multiple GPUs, Multiple CPUs