docstr: Randomly sample a dataset from the estimated pdf
  
  Args:
    key: a PRNG key used as the random key.
    shape: optional, a tuple of nonnegative integers specifying the result
      batch shape; that is, the prefix of the result shape excluding the last
      axis.
  
  Returns:
    The resampled dataset as an array with shape `(d,) + shape`.
docstr_tok: ["Randomly","sample","a","dataset","from","the","estimated","pdf","Args",":","key",":","a","PRNG","key","used","as","the","random","key",".","shape",":","optional",",","a","tuple","of","nonnegative","integers","specifying","the","result","batch","shape",";","that","is",",","the","prefix","of","the","result","shape","excluding","the","last","axis",".","Returns",":","The","resampled","dataset","as","an","array","with","shape","`","(","d",",",")","+","shape","`","."]
code: def resample(self, key, shape=()):
      r"""Randomly sample a dataset from the estimated pdf
  
      Args:
        key: a PRNG key used as the random key.
        shape: optional, a tuple of nonnegative integers specifying the result
          batch shape; that is, the prefix of the result shape excluding the last
          axis.
  
      Returns:
        The resampled dataset as an array with shape `(d,) + shape`.
      """
      ind_key, eps_key = random.split(key)
      ind = random.choice(ind_key, self.n, shape=shape, p=self.weights)
      eps = random.multivariate_normal(
          eps_key,
          jnp.zeros(self.d, self.covariance.dtype),
          self.covariance,
          shape=shape,
          dtype=self.dataset.dtype,
      ).T
      return self.dataset[:, ind] + eps
  
imports: from dataclasses import dataclass
  from functools import partial
  from typing import Any
  import numpy
  import scipy.stats
  import jax.numpy
  from jax import jit, lax, random, vmap
  from jax._src.numpy.util import check_arraylike, promote_dtypes_inexact, _wraps
  from jax._src.tree_util import register_pytree_node_class
  from jax.scipy import linalg, special
label_desc: Use image node_id 12 for calling the gaussian_kde obj's underlying member method code with example usage: obj.resample(key, shape) and returns: unknown