bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / stats / _kde / gaussian_kde / resample
function
scipy.stats._kde:gaussian_kde.resample
source: build-install/usr/lib/python3.14/site-packages/scipy/stats/_kde.py:462
Signature
def resample(self, size = None, seed = None)Summary
Randomly sample a dataset from the estimated pdf.
Parameters
size: int, optionalThe number of samples to draw. If not provided, then the size is the same as the effective number of samples in the underlying dataset.
seed: {None, int, `numpy.random.Generator`, `numpy.random.RandomState`}, optionalIf
seedis None (ornp.random), the numpy.random.RandomState singleton is used. Ifseedis an int, a newRandomStateinstance is used, seeded withseed. Ifseedis already aGeneratororRandomStateinstance then that instance is used.
Returns
resample: (self.d, `size`) ndarrayThe sampled dataset.
Aliases
scipy.stats.gaussian_kde.resample