code: def sample_mean(self, f, *args, **kwargs):
          r
          vals = self.sample_f(f, *args, **kwargs)
          return _np.mean(vals, axis=0)
docs: r"""Sample mean of numerical method f over all samples
  
          Calls f(\*args, \*\*kwargs) on all samples and computes the mean.
          f must return a numerical value or an ndarray.
  
          Parameters
          ----------
          f : method reference or name (str)
              Model method to be evaluated for each model sample
          args : arguments
              Non-keyword arguments to be passed to the method in each call
          kwargs : keyword-argments
              Keyword arguments to be passed to the method in each call
  
          Returns
          -------
          mean : float or ndarray
              mean value or mean array