get_random_sample#

Quaternion.get_random_sample(size: int | None = 1, replace: bool = False, shuffle: bool = False)[source]#

Return a new flattened object from a random sample of a given size.

Parameters:
size

Number of samples to draw. Cannot be greater than the size of this object. If not given, a single sample is drawn.

replace

See numpy.random.Generator.choice().

shuffle

See numpy.random.Generator.choice().

Returns:
new

New flattened object of a given size with elements drawn randomly from this object.