code: def phi(self, Xpred, degrees=None):
          
          assert Xpred.shape[1] == self.X.shape[1], "Need to predict with same shape as training data."
          if degrees is None:
              degrees = range(self.basis.degree+1)
          tmp_phi = np.empty((len(degrees), Xpred.shape[0], Xpred.shape[1]))
          for i, w in enumerate(degrees):
              # Objective function
              tmpX = self._phi(Xpred, w)
              tmp_phi[i] = tmpX * self.weights[[w], :]
          return tmp_phi
docs: Compute the design matrix for this model
          using the degrees given by the index array
          in degrees
  
          :param array-like Xpred: inputs to compute the design matrix for
          :param array-like degrees: array of degrees to use [default=range(self.degree+1)]
          :returns array-like phi: The design matrix [degree x #samples x #dimensions]