class_docstr: Generalised Pareto distribution.
  
  Parameters
  ----------
  xi
      Tensor containing the xi (heaviness) shape parameters. The tensor is
      of shape (*batch_shape, 1)
  beta
      Tensor containing the beta scale parameters. The tensor is of
      shape (*batch_shape, 1)
docstr: Returns the mean of the distribution, of shape (*batch_shape,)
docstr_tok: ["Returns","the","mean","of","the","distribution",",","of","shape","(","*","batch_shape",",",")"]
code: def mean(self):
      """
      Returns the mean of the distribution, of shape (*batch_shape,)
      """
      mu = torch.where(
          self.xi < 1,
          torch.div(self.beta, 1 - self.xi),
          np.nan * torch.ones_like(self.xi),
      )
      return mu
  
imports: from numbers import Number
  from typing import Dict, Optional, Tuple, cast
  import numpy
  import torch
  from torch.distributions import Distribution, constraints
  from torch.distributions.utils import broadcast_all
  from gluonts.core.component import validated
  from .distribution_output import DistributionOutput
label_desc: Use image node_id 2 for calling the GeneralizedPareto obj's underlying member method code with example usage: obj.mean() and returns: mu