Search
Search Results
Search finished, found 22 page(s) matching the search query.
- numpy.random.Generator.standard_normal
...e structure Random sampling (numpy.random) Random Generator numpy.random.Generator.standard_normal...
- numpy.random.Generator.standard_normal (Python method, in numpy.random.Generator.standard_normal)
- Legacy random generation
...rs = RandomState(12345) mt19937 = MT19937() mt19937.state = rs.get_state() rs2 = RandomState(mt19937) # Same output rs.standard_normal() rs2.standard_normal() rs.random() rs2.random() rs.standard_exponential() rs2.standard_exponential()...
- Multithreaded generation
...Multithreaded generation The four core distributions (random, standard_normal, standard_exponential, and standard_gamma) all allow existing arrays to be filled using the out keyword...
- NumPy 1.22.0 Release Notes
...always being 0. This has been fixed. This change affects the variates produced by the random.Generator methods random, standard_normal, standard_exponential, and standard_gamma, but only when the dtype is specified as numpy.float32. (gh-20...
- numpy.random.Generator.lognormal
...>>> # values, drawn from a normal distribution. >>> rng = rng >>> b = [] >>> for i in range(1000): ... a = 10. + rng.standard_normal(100) ... b.append(np.prod(a)) >>> b = np.array(b) / np.min(b) # scale values to be positive >>> cou...
- numpy.random.Generator.standard_normal
...e structure Random sampling (numpy.random) Random Generator numpy.random.Generator.standard_normal...
- numpy.random.Generator.standard_t
...case of the hyperbolic distribution. As df gets large, the result resembles that of the standard normal distribution (standard_normal). Parameters: dffloat or array_like of floatsDegrees of freedom, must be > 0. sizeint or tuple of int...
- numpy.random.lognormal
...random >>> # values, drawn from a normal distribution. >>> b = [] >>> for i in range(1000): ... a = 10. + np.random.standard_normal(100) ... b.append(np.prod(a)) >>> b = np.array(b) / np.min(b) # scale values to be positive >>> cou...
- numpy.random.randn
...the “standard normal” distribution. Note This is a convenience function for users porting code from Matlab, and wraps standard_normal. That function takes a tuple to specify the size of the output, which is consistent with other NumPy fun...
- numpy.random.RandomState.lognormal
...random >>> # values, drawn from a normal distribution. >>> b = [] >>> for i in range(1000): ... a = 10. + np.random.standard_normal(100) ... b.append(np.prod(a)) >>> b = np.array(b) / np.min(b) # scale values to be positive >>> cou...
- numpy.random.RandomState.randn
...the “standard normal” distribution. Note This is a convenience function for users porting code from Matlab, and wraps standard_normal. That function takes a tuple to specify the size of the output, which is consistent with other NumPy fun...
- numpy.random.RandomState.standard_normal
...e Random sampling (numpy.random) Legacy random generation numpy.random.RandomState.standard_normal...
- numpy.random.RandomState.standard_t
...case of the hyperbolic distribution. As df gets large, the result resembles that of the standard normal distribution (standard_normal). Note New code should use the standard_t method of a Generator instance instead; please see the Quick...
- numpy.random.standard_normal
...ule structure Random sampling (numpy.random) Legacy random generation numpy.random.standard_normal...
- numpy.random.standard_t
...case of the hyperbolic distribution. As df gets large, the result resembles that of the standard normal distribution (standard_normal). Note New code should use the standard_t method of a Generator instance instead; please see the Quick...
- Philox counter-based RNG
...York, NY: ACM, 2011. Examples >>> from numpy.random import Generator, Philox >>> rg = Generator(Philox(1234)) >>> rg.standard_normal() 0.123 # random Attributes: lock: threading.LockLock instance that is shared so that the same bit...
- Random
Generator
...stributions to choose from. Examples >>> from numpy.random import Generator, PCG64 >>> rng = Generator(PCG64()) >>> rng.standard_normal() -0.203 # random Accessing the BitGenerator and spawning bit_generator Gets the bit generator i...
- Random sampling (
numpy.random
)...) 0.06369197489564249 # may vary # Generate an array of 10 numbers according to a unit Gaussian distribution >>> rng.standard_normal(10) array([-0.31018314, -1.8922078 , -0.3628523 , -0.63526532, 0.43181166, # may vary 0.5164...
- Extending
...irectly from the _generator shared object, using the BitGenerator.cffi interface. # Compare the distributions.h random_standard_normal_fill to # Generator.standard_random bit_gen = np.random.PCG64() rng = np.random.Generator(bit_gen) state...
- Extending via CFFI
- What’s new or different
...l and gamma generators use 256-step Ziggurat methods which are 2-10 times faster than NumPy’s default implementation in standard_normal, standard_exponential or standard_gamma. Because of the change in algorithms, it is not possible to repr...