docs: def gen_weights(self, f_target): 
          """Generate a set of weights over the basis functions such 
          that the target forcing term trajectory is matched.
          
          f_target np.array: the desired forcing term trajectory
          """
  
          # calculate x and psi   
          x_track = self.cs.rollout()
          psi_track = self.gen_psi(x_track)
  
          #efficiently calculate weights for BFs using weighted linear regression
          for d in range(self.dmps):
              for b in range(self.bfs): 
                  self.w[d,b] = np.dot(psi_track[:,b], f_target[:,d]) / \
                                (np.sum(psi_track[:,b]) + 1e-10)