class_docstr: 1D Kernel Density Regression/Kernel Smoother
  
  Requires:
  x - array_like of x values
  y - array_like of y values
  Kernel - Kernel object, Default is Gaussian.
class_docstr_tok: ["1D","Kernel","Density","Regression\/Kernel","Smoother","Requires",":","x","-","array_like","of","x","values","y","-","array_like","of","y","values","Kernel","-","Kernel","object",",","Default","is","Gaussian","."]
docstr: Returns the kernel smoothed prediction at x
  
  If x is a real number then a single value is returned.
  
  Otherwise an attempt is made to cast x to numpy.ndarray and an array of
  corresponding y-points is returned.
docstr_tok: ["Returns","the","kernel","smoothed","prediction","at","x","If","x","is","a","real","number","then","a","single","value","is","returned",".","Otherwise","an","attempt","is","made","to","cast","x","to","numpy.ndarray","and","an","array","of","corresponding","y-points","is","returned","."]
code: def predict(self, x):
      """
      Returns the kernel smoothed prediction at x
  
      If x is a real number then a single value is returned.
  
      Otherwise an attempt is made to cast x to numpy.ndarray and an array of
      corresponding y-points is returned.
      """
      if np.size(x) == 1:  # if isinstance(x, numbers.Real):
          return self.Kernel.smooth(self.x, self.y, x)
      else:
          return np.array(
              [
                  self.Kernel.smooth(self.x, self.y, xx)
                  for xx in np.array(x)
              ]
          )
  
file_path: statsmodels/statsmodels/sandbox/nonparametric/smoothers.py
imports: import numpy
  from .None import kernels
label_desc: Use image node_id 4 for calling the KernelSmoother obj's underlying member method code with example usage: obj.predict(x) and returns: self, np