class_docstr: Representing the isotropic signal as a fit to an exponential decay function
  with b-values
docstr: Parameters
  ----------
  data : ndarray
  
  mask : array, optional
      A boolean array used to mark the coordinates in the data that
      should be analyzed. Has the shape `data.shape[:-1]`. Default: None,
      which implies that all points should be analyzed.
  
  Returns
  -------
  ExponentialIsotropicFit class instance.
docstr_tok: ["Parameters","--","--","--","--","--","data",":","ndarray","mask",":","array",",","optional","A","boolean","array","used","to","mark","the","coordinates","in","the","data","that","should","be","analyzed",".","Has","the","shape","`","data.shape","[",":","-1","]","`",".","Default",":","None",",","which","implies","that","all","points","should","be","analyzed",".","Returns","--","--","--","-","ExponentialIsotropicFit","class","instance","."]
code: def fit(self, data, mask=None, **kwargs):
      """
  
      Parameters
      ----------
      data : ndarray
  
      mask : array, optional
          A boolean array used to mark the coordinates in the data that
          should be analyzed. Has the shape `data.shape[:-1]`. Default: None,
          which implies that all points should be analyzed.
  
      Returns
      -------
      ExponentialIsotropicFit class instance.
      """
      to_fit = _to_fit_iso(data, self.gtab, mask=mask)
      # Fitting to the log-transformed relative data is much faster:
      nz_idx = to_fit > 0
      to_fit[nz_idx] = np.log(to_fit[nz_idx])
      to_fit[~nz_idx] = -np.inf
      params = -nanmean(
          to_fit / self.gtab.bvals[~self.gtab.b0s_mask], -1
      )
      if mask is None:
          params = np.reshape(params, data.shape[:-1])
      else:
          out_params = np.zeros(data.shape[:-1])
          out_params[mask] = params
          params = out_params
      return ExponentialIsotropicFit(self, params)
  
imports: import warnings
  import numpy
  import gc
  from collections import OrderedDict
  from dipy.utils.optpkg import optional_package
  from dipy.utils.multiproc import determine_num_processes
  import dipy.core.gradients
  import dipy.core.optimize
  import dipy.sims.voxel
  import dipy.data
  from dipy.reconst.base import ReconstModel, ReconstFit
  from dipy.reconst.cache import Cache
  from dipy.core.onetime import auto_attr
label_desc: Use image node_id 1 for calling the ExponentialIsotropicModel obj's underlying member method code with example usage: obj.fit(data, mask) and returns: ExponentialIsotropicFit