code: def interpolator(self, x, values):
          
          # hacking the barycentric interpolator by computing the weights in advance
          p = Bary([0.])
          N = len(values)
          weights = np.ones(N)
          weights[0] = .5
          weights[1::2] = -1
          weights[-1] *= .5
          p.wi = weights
          p.xi = x
          p.set_yi(values)
          return p
docs: Returns a polynomial with vector coefficients which interpolates the values at the Chebyshev points x