-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
API: stats.{PermutationMethod,BootstrapMethod}
: transition to rng
(SPEC 7)
#21886
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
Conversation
stats.PermutationMethod
: transition to rng
(SPEC 7)stats.PermutationMethod
: transition to rng
(SPEC 7)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of minor comments but otherwise looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest of the changes look good but I couldn't tell if the smoke docs failure is real
Probably not. I re-ran and now the failure is just the one that's in main. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I went through the checklist in the linked issue and this looks good
stats.PermutationMethod
: transition to rng
(SPEC 7)stats.{PermutationMethod,BootstrapMethod}
: transition to rng
(SPEC 7)
Reference issue
Towards gh-21833
What does this implement/fix?
This allows for use of new keyword
rng
alongsiderandom_state
inscipy.stats.PermutationMethod
to prepare for the deprecation and removal ofrandom_state
and its legacy behavior. This is a little trickier than other similar PRs becauserandom_state
was not only a keyword argument of the initializer but an attribute of thedataclass
.Additional information
Ready for review, but leaving as draft before comments. After making any corrections, I'll copy these ideas over to
BootstrapMethod
. We might be able to save a few lines by making a private superclass of the two, but it's probably not worth the complexity.