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","."]
code: def moments(self, n):
      if n > 2:
          msg = "Only first and second moment currently implemented"
          raise NotImplementedError(msg)
  
      if n == 1:
          return 0
  
      if n == 2:
          return self.kernel_var
  
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 14 for calling the CustomKernel obj's underlying member method code with example usage: obj.moments(n) and returns: int, self