class_docstr: Base Class for multivariate elliptical distributions, normal and t
  
  contains common initialization, and some common methods
  subclass needs to implement at least rvs and logpdf methods
class_docstr_tok: ["Base","Class","for","multivariate","elliptical","distributions",",","normal","and","t","contains","common","initialization",",","and","some","common","methods","subclass","needs","to","implement","at","least","rvs","and","logpdf","methods"]
docstr: initialize instance
  
  Parameters
  ----------
  mean : array_like
      parameter mu (might be renamed), for symmetric distributions this
      is the mean
  sigma : array_like, 2d
      dispersion matrix, covariance matrix in normal distribution, but
      only proportional to covariance matrix in t distribution
  args : list
      distribution specific arguments, e.g. df for t distribution
  kwds : dict
      currently not used
code: def __init__(self, mean, sigma, *args, **kwds):
      """initialize instance
  
      Parameters
      ----------
      mean : array_like
          parameter mu (might be renamed), for symmetric distributions this
          is the mean
      sigma : array_like, 2d
          dispersion matrix, covariance matrix in normal distribution, but
          only proportional to covariance matrix in t distribution
      args : list
          distribution specific arguments, e.g. df for t distribution
      kwds : dict
          currently not used
  
      """
  
      self.extra_args = []
      self.mean = np.asarray(mean)
      self.sigma = sigma = np.asarray(sigma)
      sigma = np.squeeze(sigma)
      self.nvars = nvars = len(mean)
      # self.covchol = np.linalg.cholesky(sigma)
  
      # in the following sigma is original, self.sigma is full matrix
      if sigma.shape == ():
          # iid
          self.sigma = np.eye(nvars) * sigma
          self.sigmainv = np.eye(nvars) / sigma
          self.cholsigmainv = np.eye(nvars) / np.sqrt(sigma)
      elif (sigma.ndim == 1) and (len(sigma) == nvars):
          # independent heteroskedastic
          self.sigma = np.diag(sigma)
          self.sigmainv = np.diag(1.0 / sigma)
          self.cholsigmainv = np.diag(1.0 / np.sqrt(sigma))
      elif sigma.shape == (nvars, nvars):  # python tuple comparison
          # general
          self.sigmainv = np.linalg.pinv(sigma)
          self.cholsigmainv = np.linalg.cholesky(self.sigmainv).T
      else:
          raise ValueError("sigma has invalid shape")
  
      # store logdetsigma for logpdf
      self.logdetsigma = np.log(np.linalg.det(self.sigma))
  
imports: import numpy
  from scipy import special
  from statsmodels.sandbox.distributions.multivariate import mvstdtprob
  from .extras import mvnormcdf
label_desc: Use image node_id 1 to create a new MVElliptical object  with example: obj = MVElliptical(mean, sigma)