Hi Team,
The permutation
and random_state
arguments of ttest_ind
were added in gh-4824 to enable the user to perform a permutation version of the t-test. A standard API for performing resampling versions of tests using a method
argument was developed in gh-18227. SPEC 7 deprecation of random_state
arguments throughout the package (gh-21833) provides additional impetus for transitioning from random_state
to method
.
gh-21921 would make the following changes to ttest_ind
:
- adds a
method
argument that allows the user to configure permutation and Monte Carlo versions of the test. - deprecates
permutation
andrandom_state
arguments in favor ofmethod
. - deprecates positional use of all arguments of
ttest_ind
afterx
andy
. The removal ofpermutation
andrandom_state
would also require later arguments (alternative
andtrim
) to be passed by keyword, anyway, and keyword-only is the modern preference for optional parameters, so the thought is that we’d make all the optional parameters keyword-only at the same time.
Thoughts on this? Please join the discussion in gh-21921!
Matt