sample_hypersphere#

QuadratiK.tools.sample_hypersphere(npoints=100, ndim=3, random_state=None)#

Generate random samples from the hypersphere

Parameters#

npointsint, optional.

The number of points to generate. Default is 100.

ndimint, optional.

The dimensionality of the hypersphere. Default is 3.

random_stateint, None, optional.

Seed for random number generation. Defaults to None

Returns#

data on spherenumpy.ndarray

An array containing random vectors sampled uniformly from the surface of the hypersphere.

Examples#

>>> from QuadratiK.tools import sample_hypersphere
>>> sample_hypersphere(100,3,random_state = 42)
... array([[ 0.60000205, -0.1670153 ,  0.78237039],
...        [ 0.97717133, -0.15023209, -0.15022156], ........