class_docstr: Generalised Pareto distribution.
  
  Parameters
  ----------
  xi
      Tensor containing the xi shape parameters, of shape
      `(*batch_shape, *event_shape)`.
  beta
      Tensor containing the beta scale parameters, of shape
      `(*batch_shape, *event_shape)`.
class_docstr_tok: ["Generalised","Pareto","distribution",".","Parameters","--","--","--","--","--","xi","Tensor","containing","the","xi","shape","parameters",",","of","shape","`","(","*","batch_shape",",","*","event_shape",")","`",".","beta","Tensor","containing","the","beta","scale","parameters",",","of","shape","`","(","*","batch_shape",",","*","event_shape",")","`","."]
code: def log_prob(self, x: Tensor) -> Tensor:
      F = self.F
      xi, beta = self.xi, self.beta
  
      def genpareto_log_prob(x, xi, beta):
          x_shifted = F.broadcast_div(x, beta)
          return -(1 + F.reciprocal(xi)) * F.log1p(
              xi * x_shifted
          ) - F.log(beta)
  
      # The genpareto_log_prob(x) above returns NaNs for x<0. Wherever there
      # are NaN in either of the F.where() conditional vectors, then F.where
      # () returns NaN at that entry as well, due to its indicator function
      # multiplication: 1*f(x) + np.nan*0 = nan, since np.nan*0 return nan.
  
      # Therefore replacing genpareto_log_prob(x) with genpareto_log_prob(abs
      # (x) mitigates nan returns in cases of x<0 without altering the value
      # in cases of x>=0. This is a known issue in pytorch as well
      # https://github.com/pytorch/pytorch/issues/12986.
  
      return F.where(
          x < 0,
          -(10.0**15) * F.ones_like(x),
          genpareto_log_prob(F.abs(x), xi, beta),
      )
  
imports: from typing import Dict, List, Optional, Tuple
  import numpy
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from gluonts.mx.distribution import box_cox_transform, uniform
  from gluonts.mx.distribution.distribution import MAX_SUPPORT_VAL, _sample_multiple, getF, softplus
  from gluonts.mx.distribution.distribution_output import DistributionOutput
  from .distribution import Distribution
label_desc: Use image node_id 7 for calling the GenPareto obj's underlying member method code with example usage: obj.log_prob(x) and returns: F, unknown