class_docstr: A multivariate t-distributed random variable.
  
  The `loc` parameter specifies the location. The `shape` parameter specifies
  the positive semidefinite shape matrix. The `df` parameter specifies the
  degrees of freedom.
  
  In addition to calling the methods below, the object itself may be called
  as a function to fix the location, shape matrix, and degrees of freedom
  parameters, returning a "frozen" multivariate t-distribution random.
  
  Methods
  -------
  ``pdf(x, loc=None, shape=1, df=1, allow_singular=False)``
      Probability density function.
  ``logpdf(x, loc=None, shape=1, df=1, allow_singular=False)``
      Log of the probability density function.
  ``rvs(loc=None, shape=1, df=1, size=1, random_state=None)``
      Draw random samples from a multivariate t-distribution.
  
  Parameters
  ----------
  x : array_like
      Quantiles, with the last axis of `x` denoting the components.
  %(_mvt_doc_default_callparams)s
  %(_doc_random_state)s
  
  Notes
  -----
  %(_mvt_doc_callparams_note)s
  The matrix `shape` must be a (symmetric) positive semidefinite matrix. The
  determinant and inverse of `shape` are computed as the pseudo-determinant
  and pseudo-inverse, respectively, so that `shape` does not need to have
  full rank.
  
  The probability density function for `multivariate_t` is
  
  .. math::
  
      f(x) = \frac{\Gamma(\nu + p)/2}{\Gamma(\nu/2)\nu^{p/2}\pi^{p/2}|\Sigma|^{1/2}}
             \exp\left[1 + \frac{1}{\nu} (\mathbf{x} - \boldsymbol{\mu})^{\top}
             \boldsymbol{\Sigma}^{-1}
             (\mathbf{x} - \boldsymbol{\mu}) \right]^{-(\nu + p)/2},
  
  where :math:`p` is the dimension of :math:`\mathbf{x}`,
  :math:`\boldsymbol{\mu}` is the :math:`p`-dimensional location,
  :math:`\boldsymbol{\Sigma}` the :math:`p \times p`-dimensional shape
  matrix, and :math:`\nu` is the degrees of freedom.
  
  .. versionadded:: 1.6.0
  
  Examples
  --------
  >>> import matplotlib.pyplot as plt
  >>> from scipy.stats import multivariate_t
  >>> x, y = np.mgrid[-1:3:.01, -2:1.5:.01]
  >>> pos = np.dstack((x, y))
  >>> rv = multivariate_t([1.0, -0.5], [[2.1, 0.3], [0.3, 1.5]], df=2)
  >>> fig, ax = plt.subplots(1, 1)
  >>> ax.set_aspect('equal')
  >>> plt.contourf(x, y, rv.pdf(pos))
docstr: Infer dimensionality from location array and shape matrix, handle
  defaults, and ensure compatible dimensions.
docstr_tok: ["Infer","dimensionality","from","location","array","and","shape","matrix",",","handle","defaults",",","and","ensure","compatible","dimensions","."]
code: def _process_parameters(self, loc, shape, df):
      """
      Infer dimensionality from location array and shape matrix, handle
      defaults, and ensure compatible dimensions.
  
      """
      if loc is None and shape is None:
          loc = np.asarray(0, dtype=float)
          shape = np.asarray(1, dtype=float)
          dim = 1
      elif loc is None:
          shape = np.asarray(shape, dtype=float)
          if shape.ndim < 2:
              dim = 1
          else:
              dim = shape.shape[0]
          loc = np.zeros(dim)
      elif shape is None:
          loc = np.asarray(loc, dtype=float)
          dim = loc.size
          shape = np.eye(dim)
      else:
          shape = np.asarray(shape, dtype=float)
          loc = np.asarray(loc, dtype=float)
          dim = loc.size
  
      if dim == 1:
          loc.shape = (1,)
          shape.shape = (1, 1)
  
      if loc.ndim != 1 or loc.shape[0] != dim:
          raise ValueError(
              "Array 'loc' must be a vector of length %d." % dim
          )
      if shape.ndim == 0:
          shape = shape * np.eye(dim)
      elif shape.ndim == 1:
          shape = np.diag(shape)
      elif shape.ndim == 2 and shape.shape != (dim, dim):
          rows, cols = shape.shape
          if rows != cols:
              msg = (
                  "Array 'cov' must be square if it is two dimensional,"
                  " but cov.shape = %s." % str(shape.shape)
              )
          else:
              msg = (
                  "Dimension mismatch: array 'cov' is of shape %s,"
                  " but 'loc' is a vector of length %d."
              )
              msg = msg % (str(shape.shape), len(loc))
          raise ValueError(msg)
      elif shape.ndim > 2:
          raise ValueError(
              "Array 'cov' must be at most two-dimensional,"
              " but cov.ndim = %d" % shape.ndim
          )
  
      # Process degrees of freedom.
      if df is None:
          df = 1
      elif df <= 0:
          raise ValueError("'df' must be greater than zero.")
      elif np.isnan(df):
          raise ValueError(
              "'df' is 'nan' but must be greater than zero or 'np.inf'."
          )
  
      return dim, loc, shape, df
  
imports: import numpy
  import scipy.linalg
  from scipy._lib import doccer
  from scipy.special import gammaln
  from scipy._lib._util import check_random_state
  from scipy.stats import mvn
label_desc: Use image node_id 8 for calling the multivariate_t_gen obj's underlying member method code with example usage: obj._process_parameters(loc, shape, df) and returns: dim,  loc,  shape,  df