help on RandomState functions show numpy examples
Closed this issue · 3 comments
leonfoks commented
Just did the following
from randomstate.prng.xorshift128 import RandomState
r = RandomState()
help(r.normal)and it finishes with
Examples
--------
Draw samples from the distribution:
mu, sigma = 0, 0.1 # mean and standard deviation
s = np.random.normal(mu, sigma, 1000)
Is this an inconsistency? Should it not be something along the lines of
from randomstate.prng.xorshift128 import RandomState
mu, sigma = 0, 0.1 # mean and standard deviation
prng = RandomState(seed)
s = prng.normal(mu, sigma, 1000)bashtage commented
This is mostly intentional since all modules derive from the NumPy RandomState and so use common docs. I decided to leave it point to numpy.random and assumed that users could substiture the correct prng as needed.
bashtage commented
It help me ensure that docstring changes and other upstream changes are propogated since the diff is similar.
leonfoks commented
Aha I see, I did follow your docs when I started with the package, but wanted to double check whether this was intentional or not.
Thanks!