code: def derivative(self, x, der=1):
          
          if len(x.shape) == 1:
              der_val = np.zeros((1))
          else:
              der_val = np.zeros((x.shape[1:]))
  
          for i, xv in enumerate(x):
              der_val += self._loglikes[i].interp.derivative(xv, der=der)
          return der_val
docs: Return the derivate of the log-like summed over the energy
          bins
  
          Parameters
          ----------
          x   : `~numpy.ndarray`
             Array of N x M values
  
          der : int
             Order of the derivate
  
          Returns
          -------
          der_val : `~numpy.ndarray`
             Array of negative log-likelihood values.