class_docstr: A class representing probability distributions.
class_docstr_tok: ["A","class","representing","probability","distributions","."]
docstr: Draw samples from the distribution.
  
  If num_samples is given the first dimension of the output will be
  num_samples.
  
  Parameters
  ----------
  num_samples
      Number of samples to to be drawn.
  dtype
      Data-type of the samples.
  
  Returns
  -------
  Tensor
      A tensor containing samples. This has shape
      `(*batch_shape, *eval_shape)` if `num_samples = None`
      and  `(num_samples, *batch_shape, *eval_shape)` otherwise.
docstr_tok: ["Draw","samples","from","the","distribution",".","If","num_samples","is","given","the","first","dimension","of","the","output","will","be","num_samples",".","Parameters","--","--","--","--","--","num_samples","Number","of","samples","to","to","be","drawn",".","dtype","Data-type","of","the","samples",".","Returns","--","--","--","-","Tensor","A","tensor","containing","samples",".","This","has","shape","`","(","*","batch_shape",",","*","eval_shape",")","`","if","`","num_samples","=","None","`","and","`","(","num_samples",",","*","batch_shape",",","*","eval_shape",")","`","otherwise","."]
code: def sample(
      self, num_samples: Optional[int] = None, dtype=np.float32
  ) -> Tensor:
      r"""
      Draw samples from the distribution.
  
      If num_samples is given the first dimension of the output will be
      num_samples.
  
      Parameters
      ----------
      num_samples
          Number of samples to to be drawn.
      dtype
          Data-type of the samples.
  
      Returns
      -------
      Tensor
          A tensor containing samples. This has shape
          `(*batch_shape, *eval_shape)` if `num_samples = None`
          and  `(num_samples, *batch_shape, *eval_shape)` otherwise.
      """
      with autograd.pause():
          var = self.sample_rep(num_samples=num_samples, dtype=dtype)
          F = getF(var)
          return F.BlockGrad(var)
  
imports: from typing import cast, Any, List, Optional, Tuple
  import mxnet
  import numpy
  from mxnet import autograd
  from gluonts.mx import Tensor
label_desc: Use image node_id 12 for calling the Distribution obj's underlying member method code with example usage: obj.sample(num_samples, dtype) and returns: F