+
    &jN
                     r    ^ RI t ^ RIt^ RIHtHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RI
Ht R.t ! R R]	4      tR# )	    N)infTensor)constraintsCauchy)TransformedDistribution)AbsTransform
HalfCauchyc                   "  a a ] tR t^t oRt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]V3R lR l4       tR tR tR tR tV3R ltRtVtV ;t# )r
   a  
Creates a half-Cauchy distribution parameterized by `scale` where::

    X ~ Cauchy(0, scale)
    Y = |X| ~ HalfCauchy(scale)

Example::

    >>> # xdoctest: +IGNORE_WANT("non-deterministic")
    >>> m = HalfCauchy(torch.tensor([1.0]))
    >>> m.sample()  # half-cauchy distributed with scale=1
    tensor([ 2.3214])

Args:
    scale (float or Tensor): scale of the full Cauchy distribution
scaleTc                H   < V ^8  d   QhRS[ S[,          RS[R,          RR/# )   r   validate_argsNreturn)r   floatbool)format__classdict__s   "w/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/torch/distributions/half_cauchy.py__annotate__HalfCauchy.__annotate__(   s6     Q Q~Q d{Q 
	Q    c                X   < \        ^ VRR7      p\        SV `	  V\        4       VR7       R# )r   F)r   N)r   super__init__r	   )selfr   r   	base_dist	__class__s   &&& r   r   HalfCauchy.__init__(   s)    
 1e59	LN-Pr   c                P   < V P                  \        V4      p\        SV `  WR 7      # ))	_instance)_get_checked_instancer
   r   expand)r   batch_shaper!   newr   s   &&& r   r#   HalfCauchy.expand0   s&    ((Y?w~k~99r   c                    < V ^8  d   QhRS[ /# r   r   r   )r   r   s   "r   r   r   5   s     $ $v $r   c                .    V P                   P                  # N)r   r   r   s   &r   r   HalfCauchy.scale4   s    ~~###r   c                    < V ^8  d   QhRS[ /# r(   r)   )r   r   s   "r   r   r   9   s     
 
f 
r   c                    \         P                  ! V P                  4       \        P                  V P
                  P                  V P
                  P                  R 7      # )dtypedevice)torchfull_extended_shapemathr   r   r1   r2   r,   s   &r   meanHalfCauchy.mean8   s@    zz  "HH**""::$$	
 	
r   c                    < V ^8  d   QhRS[ /# r(   r)   )r   r   s   "r   r   r   B   s     , ,f ,r   c                B    \         P                  ! V P                  4      # r+   )r3   
zeros_liker   r,   s   &r   modeHalfCauchy.modeA   s    

++r   c                    < V ^8  d   QhRS[ /# r(   r)   )r   r   s   "r   r   r   F   s     ' '& 'r   c                .    V P                   P                  # r+   )r   variancer,   s   &r   r@   HalfCauchy.varianceE   s    ~~&&&r   c                   V P                   '       d   V P                  V4       \        P                  ! WP                  P
                  P                  V P                  P
                  P                  R 7      pV P                  P                  V4      \        P                  ! ^4      ,           p\        P                  ! V^ 8  V\        ) 4      pV# r0   )_validate_args_validate_sampler3   	as_tensorr   r   r1   r2   log_probr6   logwherer   )r   valuerF   s   && r   rF   HalfCauchy.log_probI   s    !!%(--33DNN<P<P<W<W
 >>**51DHHQK?;;uz8cT:r   c                    V P                   '       d   V P                  V4       ^V P                  P                  V4      ,          ^,
          # r   )rC   rD   r   cdf)r   rI   s   &&r   rM   HalfCauchy.cdfS   s;    !!%(4>>%%e,,q00r   c                T    V P                   P                  V^,           ^,          4      # )   )r   icdf)r   probs   &&r   rQ   HalfCauchy.icdfX   s    ~~""D1H>22r   c                l    V P                   P                  4       \        P                  ! ^4      ,
          # rL   )r   entropyr6   rG   r,   s   &r   rU   HalfCauchy.entropy[   s"    ~~%%'$((1+55r   c                &   < V ^8  d   Qh/ S[ ;R&   # )r   r   r   )r   r   s   "r   r   r      s     . / r    r+   )__name__
__module____qualname____firstlineno____doc__r   positivearg_constraintsnonnegativesupporthas_rsampler   r#   propertyr   r7   r<   r@   rF   rM   rQ   rU   __annotate_func____static_attributes____classdictcell____classcell__)r   r   s   @@r   r
   r
      s     "  4 45O%%GKQ Q: $ $ 
 
 , , ' '1
36Y  r   )r6   r3   r   r   torch.distributionsr   torch.distributions.cauchyr   ,torch.distributions.transformed_distributionr   torch.distributions.transformsr	   __all__r
   rX   r   r   <module>rm      s2       + - P 7 .M6( M6r   