class_docstr: The interpolating polynomial for a set of points.
  
  Constructs a polynomial that passes through a given set of points.
  Allows evaluation of the polynomial, efficient changing of the y
  values to be interpolated, and updating by adding more x values.
  For reasons of numerical stability, this function does not compute
  the coefficients of the polynomial.
  The value `yi` need to be provided before the function is
  evaluated, but none of the preprocessing depends on them,
  so rapid updates are possible.
  
  Parameters
  ----------
  xi : cupy.ndarray
      1-D array of x-coordinates of the points the polynomial should
      pass through
  yi : cupy.ndarray, optional
      The y-coordinates of the points the polynomial should pass through.
      If None, the y values will be supplied later via the `set_y` method
  axis : int, optional
      Axis in the yi array corresponding to the x-coordinate values
  
  See Also
  --------
  scipy.interpolate.BarycentricInterpolator
class_docstr_tok: ["The","interpolating","polynomial","for","a","set","of","points",".","Constructs","a","polynomial","that","passes","through","a","given","set","of","points",".","Allows","evaluation","of","the","polynomial",",","efficient","changing","of","the","y","values","to","be","interpolated",",","and","updating","by","adding","more","x","values",".","For","reasons","of","numerical","stability",",","this","function","does","not","compute","the","coefficients","of","the","polynomial",".","The","value","`","yi","`","need","to","be","provided","before","the","function","is","evaluated",",","but","none","of","the","preprocessing","depends","on","them",",","so","rapid","updates","are","possible",".","Parameters","--","--","--","--","--","xi",":","cupy.ndarray","1-D","array","of","x-coordinates","of","the","points","the","polynomial","should","pass","through","yi",":","cupy.ndarray",",","optional","The","y-coordinates","of","the","points","the","polynomial","should","pass","through",".","If","None",",","the","y","values","will","be","supplied","later","via","the","`","set_y","`","method","axis",":","int",",","optional","Axis","in","the","yi","array","corresponding","to","the","x-coordinate","values","See","Also","--","--","--","--","scipy.interpolate.BarycentricInterpolator"]
docstr: Add more x values to the set to be interpolated.
  
  The barycentric interpolation algorithm allows easy updating
  by adding more points for the polynomial to pass through.
  
  Parameters
  ----------
  xi : cupy.ndarray
      The x-coordinates of the points that the polynomial should
      pass through
  yi : cupy.ndarray, optional
      The y-coordinates of the points the polynomial should pass
      through. Should have shape ``(xi.size, R)``; if R > 1 then
      the polynomial is vector-valued
      If `yi` is not given, the y values will be supplied later.
      `yi` should be given if and only if the interpolator has y
      values specified
docstr_tok: ["Add","more","x","values","to","the","set","to","be","interpolated",".","The","barycentric","interpolation","algorithm","allows","easy","updating","by","adding","more","points","for","the","polynomial","to","pass","through",".","Parameters","--","--","--","--","--","xi",":","cupy.ndarray","The","x-coordinates","of","the","points","that","the","polynomial","should","pass","through","yi",":","cupy.ndarray",",","optional","The","y-coordinates","of","the","points","the","polynomial","should","pass","through",".","Should","have","shape","``","(","xi.size",",","R",")","``",";","if","R",">","1","then","the","polynomial","is","vector-valued","If","`","yi","`","is","not","given",",","the","y","values","will","be","supplied","later",".","`","yi","`","should","be","given","if","and","only","if","the","interpolator","has","y","values","specified"]
code: def add_xi(self, xi, yi=None):
      """Add more x values to the set to be interpolated.
  
      The barycentric interpolation algorithm allows easy updating
      by adding more points for the polynomial to pass through.
  
      Parameters
      ----------
      xi : cupy.ndarray
          The x-coordinates of the points that the polynomial should
          pass through
      yi : cupy.ndarray, optional
          The y-coordinates of the points the polynomial should pass
          through. Should have shape ``(xi.size, R)``; if R > 1 then
          the polynomial is vector-valued
          If `yi` is not given, the y values will be supplied later.
          `yi` should be given if and only if the interpolator has y
          values specified
  
      """
  
      if yi is not None:
          if self.yi is None:
              raise ValueError("No previous yi value to update!")
          yi = self._reshape_yi(yi, check=True)
          self.yi = cupy.vstack((self.yi, yi))
      else:
          if self.yi is not None:
              raise ValueError("No update to yi provided!")
      old_n = self.n
      self.xi = cupy.concatenate((self.xi, xi))
      self.n = len(self.xi)
      self.wi **= -1
      old_wi = self.wi
      self.wi = cupy.zeros(self.n)
      self.wi[:old_n] = old_wi
      for j in range(old_n, self.n):
          self.wi[:j] *= self._inv_capacity * (self.xi[j] - self.xi[:j])
          self.wi[j] = cupy.prod(
              self._inv_capacity * (self.xi[:j] - self.xi[j])
          )
      self.wi **= -1
  
imports: import cupy
  from cupyx.scipy._lib._util import _asarray_validated, float_factorial
label_desc: Use image node_id 3 for calling the BarycentricInterpolator obj's underlying member method code with example usage: obj.add_xi(xi, yi) without return types