{ } Raw JSON

bundles / scipy latest / scipy / stats / _multivariate / vonmises_fisher_gen / rvs

function

scipy.stats._multivariate:vonmises_fisher_gen.rvs

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

Signature

def   rvs ( self mu = None kappa = 1 size = 1 random_state = None )

Summary

Draw random samples from a von Mises-Fisher distribution.

Parameters

mu : array_like

Mean direction of the distribution. Must be a one-dimensional unit vector of norm 1.

kappa : float

Concentration parameter. Must be positive.

size : int or tuple of ints, optional

Given a shape of, for example, (m,n,k), m*n*k samples are generated, and packed in an m-by-n-by-k arrangement. Because each sample is N-dimensional, the output shape is (m,n,k,N). If no shape is specified, a single (N-D) sample is returned.

random_state : {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

Random variates of shape (size, N), where N is the dimension of the distribution.

Aliases

  • scipy.stats._multivariate.vonmises_fisher_gen.rvs