bundles / scipy latest / scipy / stats / _multivariate / matrix_normal_gen / rvs
function
scipy.stats._multivariate:matrix_normal_gen.rvs
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, optionalMean of the distribution (default:
None)rowcov: array_like, optionalAmong-row covariance matrix of the distribution (default:
1)colcov: array_like, optionalAmong-column covariance matrix of the distribution (default:
1)size: integer, 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 isNone.
Returns
rvs: ndarray or scalarRandom variates of size (
size,dims), wheredimsis 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