class_docstr: Kernel Density Estimator
  
  Parameters
  ----------
  x : array_like
      N-dimensional array from which the density is to be estimated
  kernel : Kernel Class
      Should be a class from *
code: def __init__(self, x, kernel=None):
      x = array_like(x, "x", maxdim=2, contiguous=True)
      if x.ndim == 1:
          x = x[:, None]
  
      nobs, n_series = x.shape
  
      if kernel is None:
          kernel = kernels.Gaussian()  # no meaningful bandwidth yet
  
      if n_series > 1:
          if isinstance(kernel, kernels.CustomKernel):
              kernel = kernels.NdKernel(n_series, kernels=kernel)
  
      self.kernel = kernel
      self.n = n_series  # TODO change attribute
      self.x = x
  
file_path: statsmodels/statsmodels/sandbox/nonparametric/kde2.py
imports: from statsmodels.compat.python import lzip
  import numpy
  from statsmodels.tools.validation import array_like
  from .None import kernels
label_desc: Use image node_id 1 to create a new KDE object  with example: obj = KDE(x, kernel)