class_docstr: Base class for Joint Probability Distribution
class_docstr_tok: ["Base","class","for","Joint","Probability","Distribution"]
docstr: Returns A copy of JointProbabilityDistribution object
  
  Examples
  ---------
  >>> import numpy as np
  >>> from pgmpy.factors.discrete import JointProbabilityDistribution
  >>> prob = JointProbabilityDistribution(['x1', 'x2', 'x3'], [2, 3, 2], np.ones(12)/12)
  >>> prob_copy = prob.copy()
  >>> prob_copy.values == prob.values
  True
  >>> prob_copy.variables == prob.variables
  True
  >>> prob_copy.variables[1] = 'y'
  >>> prob_copy.variables == prob.variables
  False
docstr_tok: ["Returns","A","copy","of","JointProbabilityDistribution","object","Examples","--","--","--","--","-",">",">",">","import","numpy","as","np",">",">",">","from","pgmpy.factors.discrete","import","JointProbabilityDistribution",">",">",">","prob","=","JointProbabilityDistribution","(","[","'x1","'",",","'x2","'",",","'x3","'","]",",","[","2",",","3",",","2","]",",","np.ones","(","12",")","\/12",")",">",">",">","prob_copy","=","prob.copy","(",")",">",">",">","prob_copy.values","==","prob.values","True",">",">",">","prob_copy.variables","==","prob.variables","True",">",">",">","prob_copy.variables","[","1","]","=","'","y'",">",">",">","prob_copy.variables","==","prob.variables","False"]
code: def copy(self):
      """
      Returns A copy of JointProbabilityDistribution object
  
      Examples
      ---------
      >>> import numpy as np
      >>> from pgmpy.factors.discrete import JointProbabilityDistribution
      >>> prob = JointProbabilityDistribution(['x1', 'x2', 'x3'], [2, 3, 2], np.ones(12)/12)
      >>> prob_copy = prob.copy()
      >>> prob_copy.values == prob.values
      True
      >>> prob_copy.variables == prob.variables
      True
      >>> prob_copy.variables[1] = 'y'
      >>> prob_copy.variables == prob.variables
      False
      """
      return JointProbabilityDistribution(
          self.scope(), self.cardinality, self.values
      )
  
file_path: pgmpy/pgmpy/factors/discrete/JointProbabilityDistribution.py
imports: import itertools
  from functools import reduce
  from operator import mul
  import numpy
  from pgmpy.factors.discrete import DiscreteFactor
  from pgmpy.independencies import Independencies
label_desc: Use image node_id 8 for calling the JointProbabilityDistribution obj's underlying member method code with example usage: obj.copy() and returns: JointProbabilityDistribution