randmin#

statrl.settings.utils.randmin(A)[source]#

Index of a minimum of A, breaking ties uniformly at random.

Parameters:

A (ndarray) – Array of values to minimize over.

Returns:

Index of a minimal entry. When several entries attain the minimum, one of them is drawn uniformly at random.

Return type:

int

See also

randmax

The maximizing counterpart.

Examples

>>> import numpy as np
>>> randmin(np.array([0.4, 0.2, 0.9]))
1