code: def mad(a, c=Gaussian.ppf(3 / 4.0), axis=0, center=np.median):
      """
      The Median Absolute Deviation along given axis of an array
  
      Parameters
      ----------
      a : array_like
          Input array.
      c : float, optional
          The normalization constant.  Defined as scipy.stats.norm.ppf(3/4.),
          which is approximately 0.6745.
      axis : int, optional
          The default is 0. Can also be None.
      center : callable or float
          If a callable is provided, such as the default `np.median` then it
          is expected to be called center(a). The axis argument will be applied
          via np.apply_over_axes. Otherwise, provide a float.
  
      Returns
      -------
      mad : float
          `mad` = median(abs(`a` - center))/`c`
      """
      a = array_like(a, "a", ndim=None)
      c = float_like(c, "c")
      if not a.size:
          center_val = 0.0
      elif callable(center):
          if axis is not None:
              center_val = np.apply_over_axes(center, a, axis)
          else:
              center_val = center(a.ravel())
      else:
          center_val = float_like(center, "center")
      err = (np.abs(a - center_val)) / c
      if not err.size:
          if axis is None or err.ndim == 1:
              return np.nan
          else:
              shape = list(err.shape)
              shape.pop(axis)
              return np.empty(shape)
      return np.median(err, axis=axis)
  
file_path: statsmodels/statsmodels/robust/scale.py
imports: import numpy
  from scipy.stats import norm
  from statsmodels.tools import tools
  from statsmodels.tools.validation import array_like, float_like
  from .None import norms
  from ._qn import _qn
label_desc: Use image node_id 1 for calling a global function with example usage: mad(a, c, axis, center) and returns: np, np, np