Skip to content

Bladieblah/PyPCG

Repository files navigation

Python-PCG

This is a python wrapper around the pcg-cpp library, for randum number generation using the permuted congruential generator method. For more information, see the official website.

Installation

pip install Python-PCG

Usage:

import py_pcg

rng = py_pcg.PCG32()
rng = py_pcg.PCG32(42, 9001) # Seed with initial stream and state.

rng.rand()     # Generate a single random uniform number.
rng.randn(100)     # Generate a list of random numbers following a standard normal PDF.
rng.randint(1000, bound=100) # Generate a list of bounded random integers.

About

python wrapper around the pcg rng c++ library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published