Ë
    óÍ:j�  ã                   óT   — d dl mZmZ d dlmZ d dlmZ d dlmZ dgZ	 G d„ de«      Z
y)é    )ÚOptionalÚUnion)ÚTensor)Úconstraints)ÚGammaÚChi2c                   ó‚   ‡ — e Zd ZdZdej
                  iZ	 d	deee	f   de
e   ddfˆ fd„Zd	ˆ fd„	Zedefd„«       Zˆ xZS )
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                 ó0   •— t         ‰| �  d|z  d|¬«       y )Ng      à?)r   )ÚsuperÚ__init__)Úselfr
   r   Ú	__class__s      €úm/home/mcse/projects/srt_converter/srt-converter-venv/lib/python3.12/site-packages/torch/distributions/chi2.pyr   zChi2.__init__   s   ø€ ô
 	‰Ñ˜˜r™ 3°mÐÕDó    c                 óP   •— | j                  t        |«      }t        ‰| �  ||«      S ©N)Ú_get_checked_instancer   r   Úexpand)r   Úbatch_shapeÚ	_instanceÚnewr   s       €r   r   zChi2.expand%   s&   ø€ Ø×(Ñ(¬¨yÓ9ˆÜ‰w‰~˜k¨3Ó/Ð/r   c                 ó    — | j                   dz  S )Né   )Úconcentration)r   s    r   r
   zChi2.df)   s   € à×!Ñ! AÑ%Ð%r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚpositiveÚarg_constraintsr   r   Úfloatr   Úboolr   r   Úpropertyr
   Ú__classcell__)r   s   @r   r   r      sq   ø„ ñð ˜[×1Ñ1Ð2€Oð
 )-ñEà�&˜%�-Ñ ðEð   ‘~ðEð 
õ	Eõ0ð ð&�Fò &ó ô&r   N)Útypingr   r   Útorchr   Útorch.distributionsr   Útorch.distributions.gammar   Ú__all__r   © r   r   ú<module>r.      s&   ðç "å Ý +Ý +ð ˆ(€ô&ˆ5õ &r   