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 / multivariate_t_gen / rvs

function

scipy.stats._multivariate:multivariate_t_gen.rvs

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

Signature

def rvs(self, loc = None, shape = 1, df = 1, size = 1, random_state = None)

Summary

Draw random samples from a multivariate t-distribution.

Parameters

loc : array_like, optional

Location of the distribution. (default 0)

shape : array_like, optional

Positive semidefinite matrix of the distribution. (default 1)

df : float, optional

Degrees of freedom of the distribution; must be greater than zero. If np.inf then results are multivariate normal. The default is 1.

allow_singular : bool, optional

Whether to allow a singular matrix. (default False)

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

Examples

from scipy.stats import multivariate_t
x = [0.4, 5]
loc = [0, 1]
shape = [[1, 0.1], [0.1, 1]]
df = 7
✓
multivariate_t.rvs(loc, shape, df)
✗
array([-1.12377,  3.90762])

Aliases

  • scipy.stats._multivariate.multivariate_t_gen.rvs