+
    &jW                     z    ^ RI t ^ RIt^ RIHtHtHt ^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHtHt R.t ! R R]4      tR# )	    N)infnanTensor)constraints)Distribution)broadcast_all)_Number_sizeCauchyc                   H  a a ] tR t^t oRtR]P                  R]P                  /t]P                  t	Rt
RV3R lV 3R llltRV 3R llt]V3R lR	 l4       t]V3R
 lR l4       t]V3R lR l4       t]P$                  ! 4       3V3R lR lltR tR tR tR tRtVtV ;t# )r   a  
Samples from a Cauchy (Lorentz) distribution. The distribution of the ratio of
independent normally distributed random variables with means `0` follows a
Cauchy distribution.

Example::

    >>> # xdoctest: +IGNORE_WANT("non-deterministic")
    >>> m = Cauchy(torch.tensor([0.0]), torch.tensor([1.0]))
    >>> m.sample()  # sample from a Cauchy distribution with loc=0 and scale=1
    tensor([ 2.3214])

Args:
    loc (float or Tensor): mode or median of the distribution.
    scale (float or Tensor): half width at half maximum.
locscaleTc                ^   < V ^8  d   QhRS[ S[,          RS[ S[,          RS[R,          RR/# )   r   r   validate_argsNreturn)r   floatbool)format__classdict__s   "r/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/torch/distributions/cauchy.py__annotate__Cauchy.__annotate__&   sE     C Ce^C ~C d{	C
 
C    c                  < \        W4      w  V n        V n        \        V\        4      '       d-   \        V\        4      '       d   \
        P                  ! 4       pMV P                  P                  4       p\        SV `%  WCR 7       R# )r   N)
r   r   r   
isinstancer	   torchSizesizesuper__init__)selfr   r   r   batch_shape	__class__s   &&&& r   r"   Cauchy.__init__&   s[      -S8$*c7##
5'(B(B**,K((--/KBr   c                ,  < V P                  \        V4      p\        P                  ! V4      pV P                  P                  V4      Vn        V P                  P                  V4      Vn        \        \        V`#  VR R7       V P                  Vn	        V# )Fr   )
_get_checked_instancer   r   r   r   expandr   r!   r"   _validate_args)r#   r$   	_instancenewr%   s   &&& r   r)   Cauchy.expand3   st    ((;jj-((//+.JJ%%k2	fc#Ku#E!00
r   c                    < V ^8  d   QhRS[ /# r   r   r   )r   r   s   "r   r   r   =   s     
 
f 
r   c                    \         P                  ! V P                  4       \        V P                  P
                  V P                  P                  R 7      # )dtypedevice)r   full_extended_shaper   r   r3   r4   r#   s   &r   meanCauchy.mean<   5    zz  "Ctxx~~dhhoo
 	
r   c                    < V ^8  d   QhRS[ /# r/   r0   )r   r   s   "r   r   r   C   s      f r   c                    V P                   # N)r   r7   s   &r   modeCauchy.modeB   s    xxr   c                    < V ^8  d   QhRS[ /# r/   r0   )r   r   s   "r   r   r   G   s     
 
& 
r   c                    \         P                  ! V P                  4       \        V P                  P
                  V P                  P                  R 7      # r2   )r   r5   r6   r   r   r3   r4   r7   s   &r   varianceCauchy.varianceF   r:   r   c                &   < V ^8  d   QhRS[ RS[/# )r   sample_shaper   )r
   r   )r   r   s   "r   r   r   L   s     + +E +V +r   c                    V P                  V4      pV P                  P                  V4      P                  4       pV P                  W0P                  ,          ,           # r=   )r6   r   r,   cauchy_r   )r#   rE   shapeepss   &&  r   rsampleCauchy.rsampleL   sC    $$\2hhll5!))+xx#

***r   c                J   V P                   '       d   V P                  V4       \        P                  ! \        P                  4      ) V P
                  P                  4       ,
          WP                  ,
          V P
                  ,          ^,          P                  4       ,
          # )r   )r*   _validate_samplemathlogpir   r   log1pr#   values   &&r   log_probCauchy.log_probQ   sm    !!%(XXdggjjnn!TZZ/A5<<>?	
r   c                    V P                   '       d   V P                  V4       \        P                  ! WP                  ,
          V P
                  ,          4      \        P                  ,          R ,           # g      ?)r*   rM   r   atanr   r   rN   rP   rR   s   &&r   cdf
Cauchy.cdfZ   sI    !!%(zz588+tzz9:TWWDsJJr   c                    \         P                  ! \        P                  VR ,
          ,          4      V P                  ,          V P
                  ,           # rW   )r   tanrN   rP   r   r   rR   s   &&r   icdfCauchy.icdf_   s0    yyECK01DJJ>IIr   c                    \         P                  ! ^\         P                  ,          4      V P                  P                  4       ,           # )   )rN   rO   rP   r   r7   s   &r   entropyCauchy.entropyb   s)    xxDGG$tzz~~'777r   )r   r   r=   )__name__
__module____qualname____firstlineno____doc__r   realpositivearg_constraintssupporthas_rsampler"   r)   propertyr8   r>   rB   r   r   rJ   rT   rY   r]   ra   __static_attributes____classdictcell____classcell__)r%   r   s   @@r   r   r      s     $ k..9M9MNOGKC C 
 

   
 

 -2JJL + +

K
J8 8r   )rN   r   r   r   r   torch.distributionsr    torch.distributions.distributionr   torch.distributions.utilsr   torch.typesr	   r
   __all__r    r   r   <module>rw      s4      " " + 9 3 & *T8\ T8r   