{ } Raw JSON

bundles / scipy latest / scipy / stats / _multivariate / multivariate_normal_gen / rvs

function

scipy.stats._multivariate:multivariate_normal_gen.rvs

source: /scipy/stats/_multivariate.py :804

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 cov is a Covariance object.

size : integer, 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.

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