uniform

sherpa.utils.random.uniform(rng: Generator | RandomState | None, low: float, high: float, size: None = None) float[source] [edit on github]
sherpa.utils.random.uniform(rng: Generator | RandomState | None, low: float, high: float, size: int | Sequence[int] | ndarray) ndarray
sherpa.utils.random.uniform(rng: Generator | RandomState | None, low: Sequence[float] | ndarray, high: Sequence[float] | ndarray, size: None = None) ndarray

Create a random value within a uniform range.

Parameters:
rngnumpy.random.Generator, numpy.random.RandomState, or None

Determines how the random numbers are created. If set to None then the numpy.random.uniform routine is used.

low, high

The range [low, high].

size

The shape and size of the return.

Returns:
valuenumber or ndarray