scipy.stats.gaussian_kde.resample¶
-
gaussian_kde.
resample
(self, size=None, seed=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.
- seedNone or int or np.random.RandomState, optional
If seed is None, random variates are drawn by the RandomState singleton used by np.random. If seed is an int, a new np.random.RandomState instance is used, seeded with seed. If seed is already a np.random.RandomState instance, then that np.random.RandomState instance is used. Specify seed for reproducible drawing of random variates.
- Returns
- resample(self.d, size) ndarray
The sampled dataset.