class_docstr: In its most common representation, a multivariate Gaussian distribution
  over X1, X2, ..., Xn is characterized by an n-dimensional mean vector μ,
  and a symmetric n x n covariance matrix Σ.
  
  This is the base class for its representation.
docstr: Parameters
  ----------
  variables: iterable of any hashable python object
      The variables for which the distribution is defined.
  
  mean: list, array-like
      1-D array of size n where n is the number of variables.
  
  cov: n x n, 2-D array like
      n x n dimensional matrix where n is the number of variables.
  
  Examples
  --------
  >>> import numpy as np
  >>> from pgmpy.factors.distributions import GaussianDistribution as GD
  >>> dis = GD(variables=['x1', 'x2', 'x3'],
  ...          mean=np.array([1, -3, 4]),
  ...          cov=np.array([[4, 2, -2],
  ...                        [2, 5, -5],
  ...                        [-2, -5, 8]]))
  >>> dis.variables
  ['x1', 'x2', 'x3']
  >>> dis.mean
  array([[ 1],
         [-3],
         [4]]))
  >>> dis.cov
  array([[4, 2, -2],
         [2, 5, -5],
         [-2, -5, 8]])
  >>> dis.assignment([0, 0, 0])
  0.0014805631279234139
docstr_tok: ["Parameters","--","--","--","--","--","variables",":","iterable","of","any","hashable","python","object","The","variables","for","which","the","distribution","is","defined",".","mean",":","list",",","array-like","1-D","array","of","size","n","where","n","is","the","number","of","variables",".","cov",":","n","x","n",",","2-D","array","like","n","x","n","dimensional","matrix","where","n","is","the","number","of","variables",".","Examples","--","--","--","--",">",">",">","import","numpy","as","np",">",">",">","from","pgmpy.factors.distributions","import","GaussianDistribution","as","GD",">",">",">","dis","=","GD","(","variables=","[","'x1","'",",","'x2","'",",","'x3","'","]",",","...","mean=np.array","(","[","1",",","-3",",","4","]",")",",","...","cov=np.array","(","[","[","4",",","2",",","-2","]",",","...","[","2",",","5",",","-5","]",",","...","[","-2",",","-5",",","8","]","]",")",")",">",">",">","dis.variables","[","'x1","'",",","'x2","'",",","'x3","'","]",">",">",">","dis.mean","array","(","[","[","1","]",",","[","-3","]",",","[","4","]","]",")",")",">",">",">","dis.cov","array","(","[","[","4",",","2",",","-2","]",",","[","2",",","5",",","-5","]",",","[","-2",",","-5",",","8","]","]",")",">",">",">","dis.assignment","(","[","0",",","0",",","0","]",")","0.0014805631279234139"]
code: def __init__(self, variables, mean, cov):
      """
      Parameters
      ----------
      variables: iterable of any hashable python object
          The variables for which the distribution is defined.
  
      mean: list, array-like
          1-D array of size n where n is the number of variables.
  
      cov: n x n, 2-D array like
          n x n dimensional matrix where n is the number of variables.
  
      Examples
      --------
      >>> import numpy as np
      >>> from pgmpy.factors.distributions import GaussianDistribution as GD
      >>> dis = GD(variables=['x1', 'x2', 'x3'],
      ...          mean=np.array([1, -3, 4]),
      ...          cov=np.array([[4, 2, -2],
      ...                        [2, 5, -5],
      ...                        [-2, -5, 8]]))
      >>> dis.variables
      ['x1', 'x2', 'x3']
      >>> dis.mean
      array([[ 1],
             [-3],
             [4]]))
      >>> dis.cov
      array([[4, 2, -2],
             [2, 5, -5],
             [-2, -5, 8]])
      >>> dis.assignment([0, 0, 0])
      0.0014805631279234139
      """
      no_of_var = len(variables)
  
      self.variables = variables
      self.mean = np.asarray(
          np.reshape(mean, (no_of_var, 1)), dtype=float
      )
      self.covariance = np.asarray(cov, dtype=float)
      self._precision_matrix = None
  
      if len(mean) != no_of_var:
          raise ValueError(
              "Length of mean_vector must be equal to the",
              "number of variables.",
          )
  
      if self.covariance.shape != (no_of_var, no_of_var):
          raise ValueError(
              f"The Covariance matrix should be a square matrix  with order equal to the number of variables. Got: {self.covariance.shape}, Expected: {(no_of_var, no_of_var)}"
          )
  
imports: import numpy
  from scipy.stats import multivariate_normal
  from pgmpy.factors.distributions import BaseDistribution
label_desc: Use image node_id 1 to create a new GaussianDistribution object from inherited base classes: BaseDistribution with example: obj = GaussianDistribution(variables, mean, cov)