class_docstr: Generalised Pareto distribution.
  
  Parameters
  ----------
  xi
      Tensor containing the xi (heaviness) shape parameters
  beta
      Tensor containing the beta scale parameters
code: def __init__(self, xi, beta, validate_args=None):
      self.xi, self.beta = broadcast_all(xi, beta)
  
      if isinstance(xi, Number) and isinstance(beta, Number):
          batch_shape = torch.Size()
      else:
          batch_shape = self.xi.size()
      super().__init__(batch_shape, validate_args=validate_args)
  
      if (
          self._validate_args
          and not torch.lt(
              -self.beta, torch.zeros_like(self.beta)
          ).all()
      ):
          raise ValueError(
              "GenPareto is not defined when scale beta<=0"
          )
  
file_path: gluonts/src/gluonts/nursery/spliced_binned_pareto/genpareto.py
imports: from numbers import Number
  import torch
  from torch.distributions import constraints
  from torch.distributions.distribution import Distribution
  from torch.distributions.utils import broadcast_all
  import numpy
label_desc: Use image node_id 4 to create a new GenPareto object from inherited base classes: Distribution with example: obj = GenPareto(xi, beta, validate_args)