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"]
code: def __init__(self, xi, yi=None, axis=0):
      _Interpolator1D.__init__(self, xi, yi, axis)
  
      self.xi = xi.astype(cupy.float_)
      self.set_yi(yi)
      self.n = len(self.xi)
  
      self._inv_capacity = 4.0 / (cupy.max(self.xi) - cupy.min(self.xi))
      permute = cupy.random.permutation(self.n)
      inv_permute = cupy.zeros(self.n, dtype=cupy.int32)
      inv_permute[permute] = cupy.arange(self.n)
  
      self.wi = cupy.zeros(self.n)
      for i in range(self.n):
          dist = self._inv_capacity * (self.xi[i] - self.xi[permute])
          dist[inv_permute[i]] = 1.0
          self.wi[i] = 1.0 / cupy.prod(dist)
  
imports: import cupy
  from cupyx.scipy._lib._util import _asarray_validated, float_factorial
label_desc: Use image node_id 1 to create a new BarycentricInterpolator object from inherited base classes: _Interpolator1D with example: obj = BarycentricInterpolator(xi, yi, axis)