Evolution of randomgen¶
Changes in 1.23¶
Generator
and RandomState
were removed in 1.23.0.
Use numpy.random.Generator
if possible, or numpy.random.RandomState
if you face legacy constraints.
Changes in 1.19¶
Generator
and RandomState
have been
officially deprecated, and will warn with a FutureWarning
about their removal. They will
also receive virtually no maintenance. It is now time to move to NumPy’s numpy.random.Generator
which has features not in Generator
and is maintained more actively.
A few distributions that are not present in Generator
have been moved
to ExtendedGenerator
:
multivariate_normal()
: which supports broadcastinguintegers()
: fast 32 and 64-bit uniform integerscomplex_normal()
: scalar complex normals
There are no plans to remove any of the bit generators, e.g., AESCounter
,
ThreeFry
, or PCG64
.
Changes between 1.16 and 1.18¶
There are many changes between v1.16.x and v1.18.x. These reflect API
decision taken in conjunction with NumPy in preparation of the core
of randomgen
being used as the preferred random number generator in
NumPy. These all issue DeprecationWarning
except for BitGenerator.generator
which raises NotImplementedError
. The C-API has also changed to reflect
the preferred naming the underlying Pseudo-RNGs, which are now known as
bit generators (or BitGenerator
).
The main changes are
Rename
RandomGenerator
toGenerator
.Rename
randint
tointegers
.Rename
random_integers
tointegers
.Rename
random_sample
torandom
.Change
jump
which operated in-place tojumped
which returns a newBitGenerator
.Rename Basic RNG to bit generator, which impacts the API in multiple places where names like
brng
andbasic_rng
have been replaced bybitgen
orbit_generator
.Support for
randomgen.seed_sequence.SeedSequence
(also support NumPySeedSequence
instances)Removed support for Python 2.7