-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Description
Partial list of functions that use legacy seed
or random_state
behavior. Per SPEC 7, we're changing the keyword to rng
.
Generated mostly by searching for check_random_state
. Feel to add to this if I missed anything.
Boxes are checked when the transition_to_rng
decorator has been applied. After two releases, we will enable warning messages, and in two more releases, we'll remove the decorator.
-
scipy.cluster
-
scipy.integrate
-
Doesn't actually accept PRNG directly. Just need to ensure thatqmc_quad
qmc.check_random_state
deprecates use ofRandomState
.
-
-
scipy.interpolate
-
BarycentricInterpolator
(API: interpolate.BarycentricInterpolator: transition to Generator (SPEC 7) #21812)
-
-
scipy.linalg
-
clarkson_woodruff_transform
(API:linalg.clarkson_woodruff_transform
: transition to rng (SPEC7) #21880)
-
-
scipy.optimize
-
basinhopping
(API: optimize.basinhopping: transition to Generator (SPEC 7) #21847) -
differential_evolution
(API:optimize.differential_evolution
: transition to Generator (SPEC 7) #21774) -
dual_annealing
(API:optimize.dual_annealing
: adopt SPEC007 #21823) -
check_grad
(API:optimize.check_grad
: transition to Generator (SPEC 7) #21845) -
quadratic_assignment
(API:optimize.quadratic_assignment
: transition to rng (SPEC 7) #21848)
-
-
scipy.sparse
-
random
(API:sparse
: transitionrandom
-like functions torng
(SPEC 7) #21888) -
rand
(API:sparse
: transitionrandom
-like functions torng
(SPEC 7) #21888) -
random_array
(API:sparse
: transitionrandom
-like functions torng
(SPEC 7) #21888) -
linalg.svds
(API: sparse.linalg.svds: transition to rng (SPEC 7) #21899)
-
-
scipy.spatial
-
Rotation.random
(MAINT:spatial.transform.Rotation.random
: transition torng
keyword (SPEC 7) #21914) -
scipy.spatial.distance.directed_hausdorff
(API:spatial.directed_hausdorff
: transition to 'rng' keyword (SPEC 7) #21913)
-
-
scipy.stats
(no need to adjust old univariate or multivariate distributions)-
BootstrapMethod
(API:stats.{PermutationMethod,BootstrapMethod}
: transition torng
(SPEC 7) #21886) -
PermutationMethod
(API:stats.{PermutationMethod,BootstrapMethod}
: transition torng
(SPEC 7) #21886) -
goodness_of_fit
(API:stats
: transitiongoodness_of_fit
,sobol_indices
, anddunnett
to rng (SPEC 7) #21881) -
permutation_test
(API:stats._resampling
: transition to rng (SPEC 7) #21854, can remove dead code in_pairings_permutations_gen
once onlyGenerator
s are accepted) -
bootstrap
(API:stats._resampling
: transition to rng (SPEC 7) #21854) -
scipy.stats.sampling.NumericalInverseHermite
-
scipy.stats.sampling.NumericalInversePolynomial
-
scipy.stats.sampling.TransformedDensityRejection
-
scipy.stats.sampling.SimpleRatioUniforms
-
scipy.stats.sampling.RatioUniforms
-
scipy.stats.sampling.DiscreteAliasUrn
-
scipy.stats.sampling.DiscreteGuideTable
-
scipy.stats.sampling.FastGeneratorInversion
(another oddball; doesn't follow any convention) -
ttest_ind
(DEP:stats.ttest_ind
: deprecaterandom_state
andpermutation
in favor ofmethod
; require keywords for most args #21921) -
(legacy)multiscale_graphcorr
-
-
scipy.stats
(these need special care because theseed
argument works differently than the rest ofstats
- probably can just addDeprecationWarning
aboutRandomState
inqmc.check_random_state
)-
dunnett
(API:stats
: transitiongoodness_of_fit
,sobol_indices
, anddunnett
to rng (SPEC 7) #21881) -
scipy.stats.qmc
(MAINT: stats.qmc: transition to rng (SPEC 7) #21931)-
Halton
-
LatinHypercube
-
MultinomialQMC
-
MultivariateNormalQMC
-
PoissonDisk
-
QMCEngine
-
Sobol
-
-
sobol_indices
(API:stats
: transitiongoodness_of_fit
,sobol_indices
, anddunnett
to rng (SPEC 7) #21881)
-
Checklist for PRs:
- Applies the
_transition_to_rng
decorator- Passes correct
old_name
to decorator factory - Passes correct
position_num
to decorator factory
- Passes correct
- replaces old keyword in signature with
rng
- replaces documentation of old keyword with final documentation recommended by SPEC 7
- replaces most uses of old keyword in tests / other functions with
rng
/Generator
- notes remaining uses of old keyword (left to test backward compatibility during transition)
- check that decorator has replaced documentation correctly