docstr: Returns a copy of the CustomDistribution instance.
  
  Returns
  -------
  CustomDistribution object: copy of the instance
  
  Examples
  --------
  >>> import numpy as np
  >>> from scipy.special import beta
  >>> from pgmpy.factors.distributions import CustomDistribution
  # Two variable dirichlet distribution with alpha = (1,2)
  >>> def dirichlet_pdf(x, y):
  ...     return (np.power(x, 1) * np.power(y, 2)) / beta(x, y)
  >>> dirichlet_dist = CustomDistribution(variables=['x', 'y'],
  ...                                     distribution=dirichlet_pdf)
  >>> copy_dist = dirichlet_dist.copy()
  >>> copy_dist.variables
  ['x', 'y']
docstr_tok: ["Returns","a","copy","of","the","CustomDistribution","instance",".","Returns","--","--","--","-","CustomDistribution","object",":","copy","of","the","instance","Examples","--","--","--","--",">",">",">","import","numpy","as","np",">",">",">","from","scipy.special","import","beta",">",">",">","from","pgmpy.factors.distributions","import","CustomDistribution","#","Two","variable","dirichlet","distribution","with","alpha","=","(","1,2",")",">",">",">","def","dirichlet_pdf","(","x",",","y",")",":","...","return","(","np.power","(","x",",","1",")","*","np.power","(","y",",","2",")",")","\/","beta","(","x",",","y",")",">",">",">","dirichlet_dist","=","CustomDistribution","(","variables=","[","'","x","'",",","'","y","'","]",",","...","distribution=dirichlet_pdf",")",">",">",">","copy_dist","=","dirichlet_dist.copy","(",")",">",">",">","copy_dist.variables","[","'","x","'",",","'","y","'","]"]
code: def copy(self):
      """
      Returns a copy of the CustomDistribution instance.
  
      Returns
      -------
      CustomDistribution object: copy of the instance
  
      Examples
      --------
      >>> import numpy as np
      >>> from scipy.special import beta
      >>> from pgmpy.factors.distributions import CustomDistribution
      # Two variable dirichlet distribution with alpha = (1,2)
      >>> def dirichlet_pdf(x, y):
      ...     return (np.power(x, 1) * np.power(y, 2)) / beta(x, y)
      >>> dirichlet_dist = CustomDistribution(variables=['x', 'y'],
      ...                                     distribution=dirichlet_pdf)
      >>> copy_dist = dirichlet_dist.copy()
      >>> copy_dist.variables
      ['x', 'y']
      """
      return CustomDistribution(self.variables, self.pdf)
  
imports: import numpy
  from scipy import integrate
  from pgmpy.factors.distributions import BaseDistribution
label_desc: Use image node_id 7 for calling the CustomDistribution obj's underlying member method code with example usage: obj.copy() and returns: CustomDistribution