L iTddlmZmZddlmZddlmZddlmZdgZ GddeZ y))OptionalUnion)Tensor) constraints)GammaChi2ceZdZdZdej iZ d deee fde e ddffd Z d fd Z edefdZxZS) ra 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_argsreturnc0t|d|zd|y)Ng?)r )super__init__)selfr r __class__s ^/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/torch/distributions/chi2.pyrz Chi2.__init__s r3mDcP|jt|}t| ||SN)_get_checked_instancerrexpand)r batch_shape _instancenewrs rrz Chi2.expand%s&((y9w~k3//rc |jdzS)N) concentration)rs rr zChi2.df)s!!A%%rr)__name__ __module__ __qualname____doc__rpositivearg_constraintsrrfloatrboolrrpropertyr __classcell__)rs@rrr sq [112O )-E &%- E ~E  E0&F&&rN) typingrrtorchrtorch.distributionsrtorch.distributions.gammar__all__rrrr.s&"++ (&5&r