class_docstr: Gamma distribution.
  
  Parameters
  ----------
  alpha
      Tensor containing the shape parameters, of shape
      `(*batch_shape, *event_shape)`.
  beta
      Tensor containing the rate parameters, of shape
      `(*batch_shape, *event_shape)`.
  F
class_docstr_tok: ["Gamma","distribution",".","Parameters","--","--","--","--","--","alpha","Tensor","containing","the","shape","parameters",",","of","shape","`","(","*","batch_shape",",","*","event_shape",")","`",".","beta","Tensor","containing","the","rate","parameters",",","of","shape","`","(","*","batch_shape",",","*","event_shape",")","`",".","F"]
code: def sample(
      self, num_samples: Optional[int] = None, dtype=np.float32
  ) -> Tensor:
      epsilon = np.finfo(dtype).eps  # machine epsilon
      F = self.F
  
      samples = _sample_multiple(
          partial(F.sample_gamma, dtype=dtype),
          alpha=self.alpha,
          beta=1.0 / self.beta,
          num_samples=num_samples,
      )
      return F.clip(
          data=samples, a_min=epsilon, a_max=np.finfo(dtype).max
      )
  
imports: from functools import partial
  from typing import Dict, List, Optional, Tuple
  import numpy
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from .distribution import Distribution, _sample_multiple, getF, softplus
  from .distribution_output import DistributionOutput
label_desc: Use image node_id 9 for calling the Gamma obj's underlying member method code with example usage: obj.sample(num_samples, dtype) and returns: F