class_docstr: Distribution class for the Incremental (Spline) Quantile Function in the
  paper ``Learning Quantile Functions without Quantile Crossing for
  Distribution-free Time Series Forecasting``
  by Park, Robinson, Aubet, Kan, Gasthaus, Wang
  
  Parameters
  ----------
  spline_knots, spline_heights
      Tensor parametrizing the x-positions (y-positions) of the spline knots
      Shape: (*batch_shape, (num_qk-1), num_pieces)
  qk_x, qk_y
      Tensor containing the increasing x-positions (y-positions) of the
      quantile knots, Shape: (*batch_shape, num_qk)
  beta_l, beta_r
      Tensor containing the non-negative learnable parameter of the
      left (right) tail, Shape: (*batch_shape,)
class_docstr_tok: ["Distribution","class","for","the","Incremental","(","Spline",")","Quantile","Function","in","the","paper","``","Learning","Quantile","Functions","without","Quantile","Crossing","for","Distribution-free","Time","Series","Forecasting","``","by","Park",",","Robinson",",","Aubet",",","Kan",",","Gasthaus",",","Wang","Parameters","--","--","--","--","--","spline_knots",",","spline_heights","Tensor","parametrizing","the","x-positions","(","y-positions",")","of","the","spline","knots","Shape",":","(","*","batch_shape",",","(","num_qk-1",")",",","num_pieces",")","qk_x",",","qk_y","Tensor","containing","the","increasing","x-positions","(","y-positions",")","of","the","quantile","knots",",","Shape",":","(","*","batch_shape",",","num_qk",")","beta_l",",","beta_r","Tensor","containing","the","non-negative","learnable","parameter","of","the","left","(","right",")","tail",",","Shape",":","(","*","batch_shape",",",")"]
docstr: Evaluates the spline functions at the
  quantile levels contained in alpha
  
  Parameters
  ----------
  alpha
      Input quantile levels
  axis
      Axis along which to expand
      For details of input_alpha shape and axis,
      refer to the description in quantile_internal
  Returns
  -------
  Tensor
      Quantiles tensor
      with shape
      = (*batch_shape, num_qk-1) if axis = None
      = (1, *batch_shape, num_qk-1) if axis = 0
      = (*batch_shape, num_qk-1, num_pieces) if axis = -2
code: def quantile_spline(
      self,
      alpha: Tensor,
      axis: Optional[int] = None,
  ) -> Tensor:
      r"""
      Evaluates the spline functions at the
      quantile levels contained in alpha
  
      Parameters
      ----------
      alpha
          Input quantile levels
      axis
          Axis along which to expand
          For details of input_alpha shape and axis,
          refer to the description in quantile_internal
      Returns
      -------
      Tensor
          Quantiles tensor
          with shape
          = (*batch_shape, num_qk-1) if axis = None
          = (1, *batch_shape, num_qk-1) if axis = 0
          = (*batch_shape, num_qk-1, num_pieces) if axis = -2
      """
  
      F = self.F
      qk_y = self.qk_y
      sk_x, delta_sk_x, delta_sk_y = (
          self.sk_x,
          self.delta_sk_x,
          self.delta_sk_y,
      )
  
      if axis is not None:
          qk_y = F.expand_dims(qk_y, axis=0 if axis == 0 else -1)
          sk_x = F.expand_dims(sk_x, axis=axis)
          delta_sk_x = F.expand_dims(delta_sk_x, axis=axis)
          delta_sk_y = F.expand_dims(delta_sk_y, axis=axis)
  
      if axis is None or axis == 0:
          alpha = F.expand_dims(alpha, axis=-1)
  
      alpha = F.expand_dims(alpha, axis=-1)
  
      spline_val = F.broadcast_div(
          F.broadcast_sub(alpha, sk_x), delta_sk_x
      )
      spline_val = F.maximum(
          F.minimum(spline_val, F.ones_like(spline_val)),
          F.zeros_like(spline_val),
      )
  
      return F.broadcast_add(
          qk_y,
          F.sum(
              F.broadcast_mul(spline_val, delta_sk_y),
              axis=-1,
              keepdims=False,
          ),
      )
  
imports: from typing import Dict, List, Optional, Tuple
  import numpy
  from gluonts.core.component import validated
  from gluonts.mx import Tensor
  from gluonts.mx.util import cumsum
  from .bijection import AffineTransformation, Bijection
  from .distribution import Distribution, getF
  from .distribution_output import DistributionOutput
  from .transformed_distribution import TransformedDistribution
label_desc: Use image node_id 9 for calling the ISQF obj's underlying member method code with example usage: obj.quantile_spline(alpha, axis) and returns: F