code: def fdf(self, x):
          
          x = self._flatten(x)
          n = 1
          if hasattr(x, "__len__"):
              n = len(x)
          if self._dtype == 0:
              retval = _functional._fdf(self, x)
          else:
              retval = _functional._fdfc(self, x)
          if len(retval) == n:
              return numpy.array(retval)
          return numpy.array(retval).reshape(self.npar() + 1,
                                             n // self.ndim()).transpose()
docs: Calculate the value of the functional for the specified arguments,
          and the derivatives with respect to the parameters (taking any
          specified mask into account).
  
  
         :param x: the value(s) to evaluate at