Generator(bit_generator)
Generator
exposes a number of methods for generating random numbers drawn from a variety of probability distributions. In addition to the distribution-specific arguments, each method takes a keyword argument size
that defaults to None
. If size
is None
, then a single value is generated and returned. If size
is an integer, then a 1-D array filled with generated values is returned. If size
is a tuple, then an array with that shape is filled and returned.
The function numpy.random.default_rng
will instantiate a Generator
with numpy's default BitGenerator
.
No Compatibility Guarantee
Generator
does not provide a version compatibility guarantee. In particular, as better algorithms evolve the bit stream may change.
The Python stdlib module random
contains pseudo-random number generator with a number of methods that are similar to the ones available in Generator
. It uses Mersenne Twister, and this bit generator can be accessed using MT19937
. Generator
, besides being NumPy-aware, has the advantage that it provides a much larger number of probability distributions to choose from.
BitGenerator to use as the core generator.
Container for the BitGenerators.
default_rng
Recommended constructor for :None:None:`Generator`.
>>> from numpy.random import Generator, PCG64See :
... rng = Generator(PCG64())
... rng.standard_normal() -0.203 # random
The following pages refer to to this document either explicitly or contain code examples using this.
scipy.spatial._kdtree.KDTree.count_neighborsscipy.spatial._qhull.ConvexHullscipy.fft._realtransforms.idctnscipy.signal._bsplines.cspline1d_evalscipy.optimize._basinhopping.basinhoppingscipy.interpolate._bsplines.make_lsq_splinescipy.fft._helper.next_fast_lenscipy.linalg._expm_frechet.expm_frechetscipy.signal._signaltools.choose_conv_methodscipy.signal._signaltools.lfilterscipy.linalg.blas.get_blas_funcsscipy.interpolate._ndgriddata.griddatascipy.signal._signaltools.detrendscipy.signal._bsplines.cspline1dscipy.signal._signaltools.oaconvolvescipy.linalg.blas.find_best_blas_typescipy.linalg._decomp_svd.subspace_anglesscipy.sparse.linalg._eigen.lobpcg.lobpcg.lobpcgscipy.optimize._optimize.check_gradscipy.signal._signaltools.filtfiltscipy.fft._basic.ifftscipy.interpolate._fitpack2.UnivariateSplinescipy.linalg._decomp_svd.null_spacescipy.sparse._construct.randomscipy.signal._spectral_py.csdscipy.spatial._plotutils.voronoi_plot_2dscipy.fft._realtransforms.idstnscipy.spatial._kdtree.KDTree.query_pairsscipy.optimize._dual_annealing.VisitingDistributionscipy.signal._signaltools.correlatescipy.spatial._plotutils.convex_hull_plot_2dscipy.spatial._kdtree.KDTree.sparse_distance_matrixscipy.linalg._decomp_qz.qzscipy.signal._spectral_py.istftscipy.interpolate._ndgriddata.NearestNDInterpolatorscipy.linalg._decomp_qr.qrscipy.linalg._basic.pinvscipy.signal._signaltools.correlate2dscipy.signal._signaltools.wienerscipy.signal._bsplines.qspline1dscipy.fft._realtransforms.dctnscipy.interpolate._polyint.KroghInterpolatorscipy.spatial._qhull.tsearchscipy.signal._spectral_py.lombscarglescipy.interpolate._fitpack2.LSQUnivariateSplinescipy.signal._filter_design.freqzscipy.sparse.linalg._eigen._svds.svdsscipy.signal._signaltools.sosfiltfiltscipy.signal._signaltools.correlation_lagsscipy.signal._bsplines.qspline1d_evalscipy.fft._basic.ifftnscipy.signal._spectral_py.welchscipy.spatial._plotutils.delaunay_plot_2dscipy.interpolate._fitpack2.InterpolatedUnivariateSplinescipy.signal._spectral_py.spectrogramscipy.interpolate._rbfinterp.RBFInterpolatorscipy.optimize._minpack_py.curve_fitscipy.fft._pocketfft.helper.set_workersscipy.signal._spectral_py.periodogramscipy.linalg._decomp_svd.svdscipy.optimize._zeros_py.newtonscipy.spatial._kdtree.KDTree.query_ball_treescipy.interpolate._rbf.Rbfscipy.linalg.lapack.get_lapack_funcsscipy.signal._signaltools.fftconvolvescipy.signal._spectral_py.coherencescipy.signal._spectral_py.stftscipy.linalg._basic.pinvhscipy.fft._basic.fftnscipy.fft._realtransforms.dstnscipy.linalg._decomp_qr.rqscipy.interpolate.interpnd.LinearNDInterpolatornumpy.random.mtrand.RandomStatenumpy.randomnumpy.random._generator.Generatornumpy.random._generator.default_rngHover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them