code: def predict(self, t, filts, period=None):
          
          unique_filts = set(np.unique(filts))
          if not unique_filts.issubset(self.unique_filts_):
              raise ValueError("filts does not match training data: "
                               "input: {0} output: {1}"
                               "".format(set(self.unique_filts_),
                                         set(unique_filts)))
          t, filts = np.broadcast_arrays(t, filts)
  
          if period is None:
              period = self.best_period
  
          result = self._predict(t.ravel(), filts=filts.ravel(), period=period)
          return result.reshape(t.shape)
docs: Compute the best-fit model at ``t`` for a given period
  
          Parameters
          ----------
          t : float or array_like
              times at which to predict
          filts : array_like (optional)
              the array specifying the filter/bandpass for each observation. This
              is used only in multiband periodograms.
          period : float (optional)
              The period at which to compute the model. If not specified, it
              will be computed via the optimizer provided at initialization.
  
          Returns
          -------
          y : np.ndarray
              predicted model values at times t