scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersReturns
rng_integers(gen, low, high=None, size=None, dtype='int64', endpoint=False)

Return random integers from the "discrete uniform" distribution of the specified dtype. If high is None (the default), then results are from 0 to low.

Parameters

gen : {None, np.random.RandomState, np.random.Generator}

Random number generator. If None, then the np.random.RandomState singleton is used.

low : int or array-like of ints

Lowest (signed) integers to be drawn from the distribution (unless high=None, in which case this parameter is 0 and this value is used for high).

high : int or array-like of ints

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 values.

size : array-like 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.

dtype : {str, dtype}, optional

Desired dtype of the result. All dtypes are determined by their name, i.e., 'int64', 'int', etc, so byteorder is not available and a specific precision may have different C types depending on the platform. The default value is :None:None:`np.int_`.

endpoint : bool, optional

If True, sample from the interval [low, high] instead of the default [low, high) Defaults to False.

Returns

out: int or ndarray of ints

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

Return random integers from low (inclusive) to high (exclusive), or if endpoint=True, low (inclusive) to high (inclusive). Replaces :None:None:`RandomState.randint` (with endpoint=False) and :None:None:`RandomState.random_integers` (with endpoint=True).

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/_lib/_util.py#484
type: <class 'function'>
Commit: