SciPy

This is documentation for an old release of SciPy (version 0.17.1). Read this page in the documentation of the latest stable release (version 1.15.1).

scipy.stats.gaussian_kde.resample

gaussian_kde.resample(size=None)[source]

Randomly sample a dataset from the estimated pdf.

Parameters:

size : int, optional

The number of samples to draw. If not provided, then the size is the same as the underlying dataset.

Returns:

resample : (self.d, size) ndarray

The sampled dataset.