This is a pre-release version (2.0.0.dev0+git20260907.41eeb59).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / stats / _multivariate / dirichlet_gen / rvs

function

scipy.stats._multivariate:dirichlet_gen.rvs

source: build-install/usr/lib/python3.14/site-packages/scipy/stats/_multivariate.py:2524

Signature

def rvs(self, alpha, size = 1, random_state = None)

Summary

Draw random samples from a Dirichlet distribution.

Parameters

alpha : array_like

The concentration parameters. The number of entries determines the dimensionality of the distribution.

size : int, optional

Number of samples to draw (default 1).

seed : {None, int, np.random.RandomState, np.random.Generator}, optional

Used for drawing random variates. If seed is None, the ~np.random.RandomState singleton is used. If seed is an int, a new RandomState instance is used, seeded with seed. If seed is already a RandomState or Generator instance, then that object is used. Default is None.

Returns

rvs : ndarray or scalar

Random variates of size (size, N), where N is the dimension of the random variable.

Aliases

  • scipy.stats._multivariate.dirichlet_gen.rvs