dreye.sample_in_hull#

dreye.sample_in_hull(P, n, seed=None, engine=None, qhull_options=None)[source]#

Sampling uniformly from the convex hull defined by points P.

Parameters:
Parray-like (…, ndim)

Array of points defining the convex hull.

nint

Number of samples to generate.

seedint, Generator, or None, optional

Random seed for generating samples, by default None.

enginestr or QMCEngine, optional

Quasi-Monte Carlo engine to use for sampling, by default None.

qhull_optionsstr, optional

Additional options to pass to the Qhull algorithm, by default None.

Returns:
samplesarray-like (n, ndim)

Uniformly sampled points within the convex hull.

Raises:
TypeError

If the seed is not None, int, or Generator type.

NameError

If the engine string does not match any known QMC engines.

TypeError

If the engine is not a string or QMCEngine type.