dpnp.random.Generator.integers¶
method
- Generator.integers(low, high=None, size=None, dtype=<class 'numpy.int64'>, endpoint=False, *, usm_type=None)[source]¶
Return random integers from low (inclusive) to high (exclusive), or if
endpoint=True, low (inclusive) to high (inclusive).For full documentation refer to
numpy.random.Generator.integers.- Parameters:
- low{int, array_like of ints, dpnp.ndarray, usm_ndarray}
The smallest integer that can be drawn, or one above the largest when high is
None, in which case the smallest is 0.- high{None, int, array_like of ints, dpnp.ndarray, usm_ndarray}, optional
One above the largest integer that can be drawn, or the largest with
endpoint=True.Default:
None.- size{None, int, tuple of ints}, optional
Output shape. With
None, the broadcast shape of low and high.Default:
None.- dtypedtype, optional
The integer or boolean data type of the output.
Default:
numpy.int64.- endpointbool, optional
Whether high can be drawn.
Default:
False.- usm_type{None, "device", "shared", "host"}, optional
The type of SYCL USM allocation for the output array.
Default:
None, which means the USM type of the array parameters, or"device"when there are none.
- Returns:
- outdpnp.ndarray
The samples, of data type dtype.
Limitations
usm_type is not in NumPy's signature. The values drawn differ from NumPy's for the same range, as there is no buffering of 32-bit draws for the narrow types.