docs: def predict(self, u):
          '''Predicts the output value at u from the fitted polynomial expansion.
          Therefore the method train() must be called first.
  
          :param numpy.ndarray u: input value at which to predict the output.
  
          :return: q_approx - the predicted value of the output at u
  
          :rtype: float
  
          *Sample Usage*::
  
              >>> thePC = PolySurrogate(dimensions=2)
              >>> U = thePC.getQuadraturePoints()
              >>> Q = [myFunc(u) for u in U]
              >>> thePC.train(U, Q)
              >>> thePC.predict([0, 1])
  
          '''
          y, ysub = 0, np.zeros(self.N_poly)
          for ip in range(self.N_poly):
              inds = tuple(self.index_polys[ip])
              ysub[ip] = self.coeffs[inds]*eval_poly(u, inds, self.J_list)
              y += ysub[ip]
  
          self.response_components = ysub
          return y