-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
sample not using numpy's random state #13143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
you have to pass the state in. This was designed this way on purpose IIRC.
|
I think we should provide the proposed behaviour (next to numpy, this is also how eg sklearn's It would be a change to this line: https://github.com/pydata/pandas/blob/master/pandas/core/common.py#L2075. Looking at sklearn, we should return @ariddell interested to do a PR? |
ahh I c, so that will then use the global state, makes sense. |
Yes, I'll do the PR. Thanks for the pointer to the relevant line. On 05/11, Joris Van den Bossche wrote:
|
After fixing a random seed with
numpy.random.seed
, I expectsample
to yield the same results.Expected behavior of
numpy.random.choice
but found something different. Here is pandas:Whereas numpy.random.choice is consistent
output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: