cunumeric.random.randint#
- cunumeric.random.randint(low, high=None, size=None, dtype=None)#
Return random integers from low (inclusive) to high (exclusive).
- Parameters
low (int or array_like[int]) – Lowest (signed) integers to be drawn from the distribution (unless
high=None
, in which case this parameter is one above the highest such integer).high (int or array_like[int], optional) – If provided, one above the largest (signed) integer to be drawn from the distribution (see above for behavior if
high=None
). If array-like, must contain integer valuessize (int or tuple[int], optional) – Output shape. If the given shape is, e.g.,
(m, n, k)
, thenm * n * k
samples are drawn. Default is None, in which case a single value is returned.dtype (data-type, optional) – Desired dtype of the result. Byteorder must be native. The default value is int.
- Returns
out – size-shaped array of random integers from the appropriate distribution, or a single such random int if size not provided.
- Return type
See also
- Availability
Multiple GPUs, Multiple CPUs