bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / stats / _multivariate / multivariate_normal_gen / rvs
function
scipy.stats._multivariate:multivariate_normal_gen.rvs
source: build-install/usr/lib/python3.14/site-packages/scipy/stats/_multivariate.py:803
Signature
def rvs(self, mean = None, cov = 1, size = 1, random_state = None)Summary
Draw random samples from a multivariate normal distribution.
Parameters
mean: array_like, default: ``[0]``Mean of the distribution.
cov: array_like or `Covariance`, default: ``[1]``Symmetric positive (semi)definite covariance matrix of the distribution.
allow_singular: bool, default: ``False``Whether to allow a singular covariance matrix. This is ignored if
covis a Covariance object.size: int, optionalNumber of samples to draw (default 1).
seed: {None, int, np.random.RandomState, np.random.Generator}, optionalUsed for drawing random variates. If seed is None, the
~np.random.RandomStatesingleton is used. If seed is an int, a newRandomStateinstance is used, seeded with seed. If seed is already aRandomStateorGeneratorinstance, then that object is used. Default is None.
Returns
rvs: ndarray or scalarRandom variates of size (
size,N), whereNis the dimension of the random variable.
Notes
Setting the parameter mean to None is equivalent to having mean be the zero-vector. The parameter cov can be a scalar, in which case the covariance matrix is the identity times that value, a vector of diagonal entries for the covariance matrix, a two-dimensional array_like, or a Covariance object.
Aliases
scipy.stats._multivariate.multivariate_normal_gen.rvs