The sherpa.utils.random module

Basic routines for handling random numbers.

A number of routines have been added to support writing code that allows both the legacy (pre 1.17) NumPy random API to be used (with rng set to None) or the new generator approach.

Functions

chisquare(rng, df[, size])

Create a random value from a multivariate normal distribution.

choice(rng, xs, n)

Create a subset of elements from xs with no duplication.

integers(rng, high)

Create a random integer from [0, high).

multivariate_normal(rng, mean, cov[, size])

Create a random value from a multivariate normal distribution.

normal(rng[, loc, scale, size])

Create a random value from a normal distribution.

poisson_noise(x[, rng])

Draw samples from a Poisson distribution.

random(rng)

Create a random value [0, 1.0)

standard_normal(rng[, size])

Create a random value from a normal distribution (mean=0, stdev=1).

uniform(rng, low, high[, size])

Create a random value within a uniform range.