class_docstr: Student's t-distribution (sktime native).
  
  Parameters
  ----------
  mean : float or array of float (1D or 2D)
      mean of the t-distribution distribution
  sd : float or array of float (1D or 2D), must be positive
      standard deviation of the t-distribution distribution
  df : float or array of float (1D or 2D), must be positive
      Degrees of freedom of the t-distribution
  index : pd.Index, optional, default = RangeIndex
  columns : pd.Index, optional, default = RangeIndex
  
  Example
  -------
  >>> from sktime.proba.t import TDistribution
  
  >>> n = TDistribution(mu=[[0, 1], [2, 3], [4, 5]], sigma=1, df=10)
class_docstr_tok: ["Student","'s","t-distribution","(","sktime","native",")",".","Parameters","--","--","--","--","--","mean",":","float","or","array","of","float","(","1D","or","2D",")","mean","of","the","t-distribution","distribution","sd",":","float","or","array","of","float","(","1D","or","2D",")",",","must","be","positive","standard","deviation","of","the","t-distribution","distribution","df",":","float","or","array","of","float","(","1D","or","2D",")",",","must","be","positive","Degrees","of","freedom","of","the","t-distribution","index",":","pd.Index",",","optional",",","default","=","RangeIndex","columns",":","pd.Index",",","optional",",","default","=","RangeIndex","Example","--","--","--","-",">",">",">","from","sktime.proba.t","import","TDistribution",">",">",">","n","=","TDistribution","(","mu=","[","[","0",",","1","]",",","[","2",",","3","]",",","[","4",",","5","]","]",",","sigma=1",",","df=10",")"]
docstr: Return element/entry-wise variance of the distribution.
  
  Let :math:`X` be a random variable with the distribution of `self`.
  Returns,
  
  .. math::
      \mathbb{V}[X] = \begin{cases}
          \frac{\nu}{\nu - 2} & \text{if} \nu > 2, \\
          \infty              & \text{if} \nu \le 2, \\
      \begin{cases}
  
  Where :math:`\nu` is the degrees of freedom of the t-distribution.
  
  Returns
  -------
  pd.DataFrame with same rows, columns as `self`
  variance of distribution (entry-wise)
docstr_tok: ["Return","element\/entry-wise","variance","of","the","distribution",".","Let",":","math",":","`","X","`","be","a","random","variable","with","the","distribution","of","`","self","`",".","Returns",",","..","math",":",":","\\mathbb","{","V","}","[","X","]","=","\\begin","{","cases","}","\\frac","{","\\nu","}","{","\\nu","-","2","}","&","\\text","{","if","}","\\nu",">","2",",","\\\\","\\infty","&","\\text","{","if","}","\\nu","\\le","2",",","\\\\","\\begin","{","cases","}","Where",":","math",":","`","\\nu","`","is","the","degrees","of","freedom","of","the","t-distribution",".","Returns","--","--","--","-","pd.DataFrame","with","same","rows",",","columns","as","`","self","`","variance","of","distribution","(","entry-wise",")"]
code: def var(self):
      r"""Return element/entry-wise variance of the distribution.
  
          Let :math:`X` be a random variable with the distribution of `self`.
          Returns,
  
          .. math::
              \mathbb{V}[X] = \begin{cases}
                  \frac{\nu}{\nu - 2} & \text{if} \nu > 2, \\
                  \infty              & \text{if} \nu \le 2, \\
              \begin{cases}
  
          Where :math:`\nu` is the degrees of freedom of the t-distribution.
  
          Returns
          -------
          pd.DataFrame with same rows, columns as `self`
          variance of distribution (entry-wise)
          """
      df_arr = self._df.copy()
      df_arr = df_arr.astype(np.float32)
      df_arr[df_arr <= 2] = np.inf
      mask = (df_arr > 2) & (df_arr != np.inf)
      df_arr[mask] = df_arr[mask] / (df_arr[mask] - 2)
      return pd.DataFrame(
          df_arr, index=self.index, columns=self.columns
      )
  
file_path: sktime/sktime/proba/t.py
imports: import numpy
  import pandas
  from scipy.special import betaincinv, gamma, hyp2f1, loggamma
  from sktime.proba.base import BaseDistribution
label_desc: Use image node_id 3 for calling the TDistribution obj's underlying member method code with example usage: obj.var() and returns: pd