randomgen.rdrand.RDRAND.random_raw

RDRAND.random_raw(size=None, output=True)

Return randoms as generated by the underlying BitGenerator

Parameters
sizeint 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.

outputbool, optional

Output values. Used for performance testing since the generated values are not returned.

Returns
out{uint64, ndarray, None}

Drawn samples.

Raises
RuntimeError

Raised if the RDRAND instruction fails after retries.