Implements the ran2 function from FORTRAN Numerical Recipes
Project description
RAN2
Python port of the ran2 random number generator from FORTRAN NUMERICAL RECIPES. Long period (> 2 × 1018) random number generator of L’Ecuyer with Bays-Durham shuffle and added safeguards. Returns a uniform random deviate between 0.0 and 1.0 (exclusive of the endpoint values). Call with iseed, a “large” negative number to initialize.
EXAMPLE:
Create a random seed. Must be a “large” negative number
iseed = -12345678
Initialize the wrapper with that iseed. Each class instance can use a different seed to get a different sequence
x = ran2_wrapper(iseed)
Call the random number generator
x.ran2()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file ran2-1.3.tar.gz.
File metadata
- Download URL: ran2-1.3.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.5.0.1 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77ffbccaeaee278052e4739431b4de4d157507a023e1d13cd7c0b7aaa4badc59
|
|
| MD5 |
080b15f061a15944c3e4a9a075a8388d
|
|
| BLAKE2b-256 |
9c0c175ed9890bbee7279e6fd016901299cad46f0b04ee82e48c3683b3959d10
|