SciPy

scipy.stats.gaussian_kde.resample

gaussian_kde.resample(self, size=None)[source]

Randomly sample a dataset from the estimated pdf.

Parameters
sizeint, optional

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

Returns
resample(self.d, size) ndarray

The sampled dataset.

Previous topic

scipy.stats.gaussian_kde.logpdf

Next topic

scipy.stats.gaussian_kde.set_bandwidth