statsmodels.distributions.bernstein.BernsteinDistributionBV.rvs#

BernsteinDistributionBV.rvs(nobs, rng=None)#

Generate random numbers from distribution.

Parameters:
nobsint

Number of random observations to generate.

rngint, array_like of int, numpy.random.Generator, or numpy.random.RandomState, optional

If rng is None, a new Generator is created using fresh entropy from the operating system. If rng is an int or array of ints, a new Generator is created, seeded with rng. If rng is already a Generator or RandomState instance, that instance is used.

rngint, array_like of int, numpy.random.Generator, or numpy.random.RandomState, optional

Deprecated since version 0.15: random_state has been deprecated. In-line with SPEC-007, use rng for passing a random number generator or seed.

Returns:
ndarray

Random samples from the Bernstein polynomial distribution, with nobs rows and k_dim columns.