scipy.stats.sampling.TransformedDensityRejection.rvs#
- TransformedDensityRejection.rvs(size=None, random_state=None)#
Sample from the distribution.
- Parameters:
- sizeint or tuple, optional
The shape of samples. Default is
None
in which case a scalar sample is returned.- random_state{None, int,
numpy.random.Generator
, numpy.random.RandomState
}, optionalA NumPy random number generator or seed for the underlying NumPy random number generator used to generate the stream of uniform random numbers. If random_state is None (or np.random), random_state provided during initialization is used. If random_state is an int, a new
RandomState
instance is used, seeded with random_state. If random_state is already aGenerator
orRandomState
instance then that instance is used.
- Returns:
- rvsarray_like
A NumPy array of random variates.