code: def _compute_ymean(self, **kwargs):
          
          y = np.asarray(kwargs.get('y', self.y))
          dy = np.asarray(kwargs.get('dy', self.dy))
  
          if dy.size == 1:
              return np.mean(y)
          else:
              return np.average(y, weights=1 / dy ** 2)
docs: Compute the (weighted) mean of the y data