
    9i                     T    S SK JrJr  S SKJr  S SKJr  S SKJr  S/r	 " S S\5      r
g)    )OptionalUnion)Tensor)constraints)GammaChi2c                      ^  \ rS rSrSrS\R                  0r SS\\	\
4   S\\   SS4U 4S jjjrSU 4S jjr\S\	4S	 j5       rS
rU =r$ )r      a  
Creates a Chi-squared distribution parameterized by shape parameter :attr:`df`.
This is exactly equivalent to ``Gamma(alpha=0.5*df, beta=0.5)``

Example::

    >>> # xdoctest: +IGNORE_WANT("non-deterministic")
    >>> m = Chi2(torch.tensor([1.0]))
    >>> m.sample()  # Chi2 distributed with shape df=1
    tensor([ 0.1046])

Args:
    df (float or Tensor): shape parameter of the distribution
dfNvalidate_argsreturnc                 *   > [         TU ]  SU-  SUS9  g )Ng      ?)r   )super__init__)selfr   r   	__class__s      X/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/torch/distributions/chi2.pyr   Chi2.__init__   s    
 	r3mD    c                 N   > U R                  [        U5      n[        TU ]  X5      $ N)_get_checked_instancer   r   expand)r   batch_shape	_instancenewr   s       r   r   Chi2.expand%   s$    ((y9w~k//r   c                      U R                   S-  $ )N   )concentration)r   s    r   r   Chi2.df)   s    !!A%%r    r   )__name__
__module____qualname____firstlineno____doc__r   positivearg_constraintsr   r   floatr   boolr   r   propertyr   __static_attributes____classcell__)r   s   @r   r   r      sw     [112O
 )-E&%- E  ~E 
	E E0 &F & &r   N)typingr   r   torchr   torch.distributionsr   torch.distributions.gammar   __all__r   r"   r   r   <module>r4      s&    "  + + (&5 &r   