You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
parts of the random API missing from intersphinx #14359
The numpy.random refactor somehow has caused entries in the intersphinx numpy output to go missing. at least numpy.random.RandomState and numpy.random.weibull, so probably the whole older API is missing (and perhaps the new one as well).
The tracking issue for the workaround in SciPy (explicitly referencing random.mtrand.<object> is scipy/scipy#10545
Left to decide: there's still two namespaces left that look private:
numpy.random.entropy (contains random_entropy and seed_by_array, unclear if those need to be public)
numpy.random.bit_generator (contains only BitGenerator as a public object I think)
Left to do:
doc/source/reference/random/index.rst is missing links to numpy.random.<function> (e.g. np.random.seed, np.random.randn). They are completely missing from the docs.
numpy.random.entropy (contains random_entropy and seed_by_array, unclear if those need to be public)
I'm not sure these are used anymore after moving to SeedSeq. They might be removable. The only advantage is that random_entropy ready system entropy to an ndarray. It predates Python 3.x only and so was needed since there wasn't a good way to universally ready entropy. IIRC entropy is read from random now.
entropy.random_entropy is still used by mt19937.pyx. SeedSequence uses randbits. Should we move entropy to _entropy or replace it with randbitsSeedSequence().generate_state(RK_STATE_LEN) (mt19967 is legacy, but this is for the case where no seed is provided)?
numpy.random.random_integers and friends are documented via RandomState, i.e. via numpy.random.RandomState.random_integers. Since we would like to encourage people not to use these functions directly, I think this is preferable.
entropy.random_entropy is still used by mt19937.pyx. SeedSequence uses randbits. Should we move entropy to _entropy or replace it with randbitsSeedSequence().generate_state(RK_STATE_LEN) (mt19967 is legacy, but this is for the case where no seed is provided)?
I think SS is the right idea here. Empty to not reproducible so might as well DRY here and remove entropy.
Activity
rgommers commentedon Aug 25, 2019
okay there's quite a few other issues in the
numpy.randomdocs, I'll see if I can send a fix today.DOC: fix doc linking, was referencing private submodules.
rgommers commentedon Sep 1, 2019
gh-14360 doesn't address everything yet, I just discovered that all
np.random.<funcname>functions are missing from the docs.rgommers commentedon Sep 7, 2019
Left to decide: there's still two namespaces left that look private:
random_entropyandseed_by_array, unclear if those need to be public)BitGeneratoras a public object I think)Left to do:
doc/source/reference/random/index.rstis missing links tonumpy.random.<function>(e.g.np.random.seed,np.random.randn). They are completely missing from the docs.bashtage commentedon Sep 13, 2019
I'm not sure these are used anymore after moving to SeedSeq. They might be removable. The only advantage is that random_entropy ready system entropy to an ndarray. It predates Python 3.x only and so was needed since there wasn't a good way to universally ready entropy. IIRC entropy is read from
randomnow.mattip commentedon Sep 13, 2019
entropy.random_entropyis still used bymt19937.pyx.SeedSequence usesShould we moverandbits.entropyto_entropyor replace it withrandbitsSeedSequence().generate_state(RK_STATE_LEN)(mt19967 is legacy, but this is for the case where no seed is provided)?Edit: use
SeedSequence(), notrandbitsdirectly.bashtage commentedon Sep 13, 2019
With that one change, then it could be removed.
DOC: fix doc linking, was referencing private submodules.
mattip commentedon Oct 15, 2019
numpy.random.random_integersand friends are documented via RandomState, i.e. vianumpy.random.RandomState.random_integers. Since we would like to encourage people not to use these functions directly, I think this is preferable.bashtage commentedon Oct 16, 2019
I think SS is the right idea here. Empty to not reproducible so might as well DRY here and remove entropy.
mattip commentedon Nov 22, 2019
Is there a way to check that gh-14948 fixes scipy/scipy#10545?
rgommers commentedon Nov 24, 2019
discussed with @mattip: this will fix it, let's just merge and then update SciPy after to use inter-sphinx links for the random functions again.
The Cython changes are the more interesting ones in this PR.
charris commentedon Nov 25, 2019
Going to close this as the fix has a 1.18 milestone.