naginterfaces.library.rand.dist_​uniform01

naginterfaces.library.rand.dist_uniform01(n, statecomm)[source]

dist_uniform01 generates a vector of pseudorandom numbers taken from a uniform distribution between and .

For full information please refer to the NAG Library document for g05sa

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/g05/g05saf.html

Parameters
nint

, the number of pseudorandom numbers to be generated.

statecommdict, RNG communication object, modified in place

RNG communication structure.

This argument must have been initialized by a prior call to init_repeat() or init_nonrepeat().

Returns
xfloat, ndarray, shape

The pseudorandom numbers from a uniform distribution over the half closed interval .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, [‘state’] vector has been corrupted or not initialized.

Notes

dist_uniform01 generates values from a uniform distribution over the half closed interval .

One of the initialization functions init_repeat() (for a repeatable sequence if computed sequentially) or init_nonrepeat() (for a non-repeatable sequence) must be called prior to the first call to dist_uniform01.

References

Knuth, D E, 1981, The Art of Computer Programming (Volume 2), (2nd Edition), Addison–Wesley