class_docstr: Generic 1D Kernel object.
  Can be constructed by selecting a standard named Kernel,
  or providing a lambda expression and domain.
  The domain allows some algorithms to run faster for finite domain kernels.
class_docstr_tok: ["Generic","1D","Kernel","object",".","Can","be","constructed","by","selecting","a","standard","named","Kernel",",","or","providing","a","lambda","expression","and","domain",".","The","domain","allows","some","algorithms","to","run","faster","for","finite","domain","kernels","."]
docstr: Returns the filtered (xs, ys) based on the Kernel domain centred on x
code: def in_domain(self, xs, ys, x):
      """
      Returns the filtered (xs, ys) based on the Kernel domain centred on x
      """
  
      # Disable black-list functions: filter used for speed instead of
      # list-comprehension
      # pylint: disable-msg=W0141
      def isInDomain(xy):
          """Used for filter to check if point is in the domain"""
          u = (xy[0] - x) / self.h
          return np.all((u >= self.domain[0]) & (u <= self.domain[1]))
  
      if self.domain is None:
          return (xs, ys)
      else:
          filtered = lfilter(isInDomain, lzip(xs, ys))
          if len(filtered) > 0:
              xs, ys = lzip(*filtered)
              return (xs, ys)
          else:
              return ([], [])
  
imports: from statsmodels.compat.python import lzip, lfilter
  import numpy
  import scipy.integrate
  from scipy.special import factorial
  from numpy import exp, multiply, square, divide, subtract, inf
label_desc: Use image node_id 4 for calling the CustomKernel obj's underlying member method code with example usage: obj.in_domain(xs, ys, x) and returns: np, xs,  ys, xs,  ys, list,  list