mkl_random.MKLRandomState.tomaxint

MKLRandomState.tomaxint(size=None)

Return a sample of uniformly distributed random integers in the interval [0, np.iinfo("long").max].

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.

Returns:
outndarray

Drawn samples, with shape size.

See also

randint

Uniform sampling over a given half-open interval of integers.

random_integers

Uniform sampling over a given closed interval of integers.

Examples

>>> RS = mkl_random.MKLRandomState() # need a MKLRandomState object
>>> RS.tomaxint((2,2,2))
array([[[1170048599, 1600360186],
        [ 739731006, 1947757578]],
       [[1871712945,  752307660],
        [1601631370, 1479324245]]])
>>> import sys
>>> sys.maxint
2147483647
>>> RS.tomaxint((2,2,2)) < sys.maxint
array([[[ True,  True],
        [ True,  True]],
       [[ True,  True],
        [ True,  True]]], dtype=bool)