class_docstr: Creates a Wishart distribution parameterized by a symmetric positive definite matrix :math:`\Sigma`,
  or its Cholesky decomposition :math:`\mathbf{\Sigma} = \mathbf{L}\mathbf{L}^\top`
  
  Example:
      >>> # xdoctest: +SKIP("FIXME: scale_tril must be at least two-dimensional")
      >>> m = Wishart(torch.Tensor([2]), covariance_matrix=torch.eye(2))
      >>> m.sample()  # Wishart distributed with mean=`df * I` and
      >>>             # variance(x_ij)=`df` for i != j and variance(x_ij)=`2 * df` for i == j
  
  Args:
      df (float or Tensor): real-valued parameter larger than the (dimension of Square matrix) - 1
      covariance_matrix (Tensor): positive-definite covariance matrix
      precision_matrix (Tensor): positive-definite precision matrix
      scale_tril (Tensor): lower-triangular factor of covariance, with positive-valued diagonal
  Note:
      Only one of :attr:`covariance_matrix` or :attr:`precision_matrix` or
      :attr:`scale_tril` can be specified.
      Using :attr:`scale_tril` will be more efficient: all computations internally
      are based on :attr:`scale_tril`. If :attr:`covariance_matrix` or
      :attr:`precision_matrix` is passed instead, it is only used to compute
      the corresponding lower triangular matrices using a Cholesky decomposition.
      'torch.distributions.LKJCholesky' is a restricted Wishart distribution.[1]
  
  **References**
  
  [1] Wang, Z., Wu, Y. and Chu, H., 2018. `On equivalence of the LKJ distribution and the restricted Wishart distribution`.
  [2] Sawyer, S., 2007. `Wishart Distributions and Inverse-Wishart Sampling`.
  [3] Anderson, T. W., 2003. `An Introduction to Multivariate Statistical Analysis (3rd ed.)`.
  [4] Odell, P. L. & Feiveson, A. H., 1966. `A Numerical Procedure to Generate a SampleCovariance Matrix`. JASA, 61(313):199-203.
  [5] Ku, Y.-C. & Bloomfield, P., 2010. `Generating Random Wishart Matrices with Fractional Degrees of Freedom in OX`.
class_docstr_tok: ["Creates","a","Wishart","distribution","parameterized","by","a","symmetric","positive","definite","matrix",":","math",":","`","\\Sigma","`",",","or","its","Cholesky","decomposition",":","math",":","`","\\mathbf","{","\\Sigma","}","=","\\mathbf","{","L","}","\\mathbf","{","L","}","^\\top","`","Example",":",">",">",">","#","xdoctest",":","+SKIP","(","``","FIXME",":","scale_tril","must","be","at","least","two-dimensional","''",")",">",">",">","m","=","Wishart","(","torch.Tensor","(","[","2","]",")",",","covariance_matrix=torch.eye","(","2",")",")",">",">",">","m.sample","(",")","#","Wishart","distributed","with","mean=","`","df","*","I","`","and",">",">",">","#","variance","(","x_ij",")","=","`","df","`","for","i","!","=","j","and","variance","(","x_ij",")","=","`","2","*","df","`","for","i","==","j","Args",":","df","(","float","or","Tensor",")",":","real-valued","parameter","larger","than","the","(","dimension","of","Square","matrix",")","-","1","covariance_matrix","(","Tensor",")",":","positive-definite","covariance","matrix","precision_matrix","(","Tensor",")",":","positive-definite","precision","matrix","scale_tril","(","Tensor",")",":","lower-triangular","factor","of","covariance",",","with","positive-valued","diagonal","Note",":","Only","one","of",":","attr",":","`","covariance_matrix","`","or",":","attr",":","`","precision_matrix","`","or",":","attr",":","`","scale_tril","`","can","be","specified",".","Using",":","attr",":","`","scale_tril","`","will","be","more","efficient",":","all","computations","internally","are","based","on",":","attr",":","`","scale_tril","`",".","If",":","attr",":","`","covariance_matrix","`","or",":","attr",":","`","precision_matrix","`","is","passed","instead",",","it","is","only","used","to","compute","the","corresponding","lower","triangular","matrices","using","a","Cholesky","decomposition",".","'torch.distributions.LKJCholesky","'","is","a","restricted","Wishart","distribution",".","[","1","]","*","*","References","*","*","[","1","]","Wang",",","Z.",",","Wu",",","Y.","and","Chu",",","H.",",","2018",".","`","On","equivalence","of","the","LKJ","distribution","and","the","restricted","Wishart","distribution","`",".","[","2","]","Sawyer",",","S.",",","2007",".","`","Wishart","Distributions","and","Inverse-Wishart","Sampling","`",".","[","3","]","Anderson",",","T.","W.",",","2003",".","`","An","Introduction","to","Multivariate","Statistical","Analysis","(","3rd","ed.",")","`",".","[","4","]","Odell",",","P.","L.","&","Feiveson",",","A.","H.",",","1966",".","`","A","Numerical","Procedure","to","Generate","a","SampleCovariance","Matrix","`",".","JASA",",","61","(","313",")",":199-203",".","[","5","]","Ku",",","Y.-C.","&","Bloomfield",",","P.",",","2010",".","`","Generating","Random","Wishart","Matrices","with","Fractional","Degrees","of","Freedom","in","OX","`","."]
code: def entropy(self):
      nu = self.df  # has shape (batch_shape)
      p = self._event_shape[-1]  # has singleton shape
      V = (
          self.covariance_matrix
      )  # has shape (batch_shape x event_shape)
      return (
          (p + 1)
          * (
              p * _log_2 / 2
              + self._unbroadcasted_scale_tril.diagonal(
                  dim1=-2, dim2=-1
              )
              .log()
              .sum(-1)
          )
          + torch.mvlgamma(nu / 2, p=p)
          - (nu - p - 1) / 2 * _mvdigamma(nu / 2, p=p)
          + nu * p / 2
      )
  
imports: import math
  import warnings
  from numbers import Number
  from typing import Optional, Union
  import torch
  from torch import nan
  from torch.distributions import constraints
  from torch.distributions.exp_family import ExponentialFamily
  from torch.distributions.multivariate_normal import _precision_to_scale_tril
  from torch.distributions.utils import lazy_property
label_desc: Use image node_id 12 for calling the Wishart obj's underlying member method code with example usage: obj.entropy() and returns: unknown