code: def eval_grad(self):
          
  
          # Compute X D - S
          Ryf = self.eval_Rf(self.Yf)
  
          gradf = sl.inner(np.conj(self.Zf), Ryf, axis=self.cri.axisK)
  
          # Multiple channel signal, single channel dictionary
          if self.cri.C > 1 and self.cri.Cd == 1:
              gradf = np.sum(gradf, axis=self.cri.axisC, keepdims=True)
  
          return gradf
docs: Compute gradient in Fourier domain.