{ } Raw JSON

bundles / scipy 1.17.1 / scipy / stats / _multivariate / matrix_normal_gen / rvs

function

scipy.stats._multivariate:matrix_normal_gen.rvs

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

Signature

def   rvs ( self mean = None rowcov = 1 colcov = 1 size = 1 random_state = None )

Summary

Draw random samples from a matrix normal distribution.

Parameters

mean : array_like, optional

Mean of the distribution (default: None)

rowcov : array_like, optional

Among-row covariance matrix of the distribution (default: 1)

colcov : array_like, optional

Among-column covariance matrix of the distribution (default: 1)

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, dims), where dims is the dimension of the random matrices.

Notes

If mean is set to None then a matrix of zeros is used for the mean. The dimensions of this matrix are inferred from the shape of rowcov and colcov, if these are provided, or set to 1 if ambiguous.

rowcov and colcov can be two-dimensional array_likes specifying the covariance matrices directly. Alternatively, a one-dimensional array will be be interpreted as the entries of a diagonal matrix, and a scalar or zero-dimensional array will be interpreted as this value times the identity matrix.

Aliases

  • scipy.stats._multivariate.matrix_normal_gen.rvs