'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.'

def resample(self, size=None):

    if (size is None):
        size = self.n
    norm = transpose(multivariate_normal(zeros((self.d,), float), self.covariance, size=size))
    indices = randint(0, self.n, size=size)
    means = self.dataset[:, indices]
    return (means + norm)
