dpnp.random.random_integers

dpnp.random.random_integers(low, high=None, size=None, device=None, usm_type='device', sycl_queue=None)[source]

Random integers between low and high, inclusive.

For full documentation refer to numpy.random.random_integers.

Parameters:
  • device ({None, string, SyclDevice, SyclQueue}, optional) -- An array API concept of device where the output array is created. The device can be None (the default), an OneAPI filter selector string, an instance of dpctl.SyclDevice corresponding to a non-partitioned SYCL device, an instance of dpctl.SyclQueue, or a Device object returned by dpnp.dpnp_array.dpnp_array.device property.

  • usm_type ({"device", "shared", "host"}, optional) -- The type of SYCL USM allocation for the output array.

  • sycl_queue ({None, SyclQueue}, optional) -- A SYCL queue to use for output array allocation and copying. The sycl_queue can be passed as None (the default), which means to get the SYCL queue from device keyword if present or to use a default queue. Default: None.

Returns:

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

Return type:

dpnp.ndarray

Limitations

Parameters low and high are supported as scalar. Otherwise, numpy.random.random_integers(low, high, size) samples are drawn.