code: def mex_hat_dir(x, y, sigma):
      r
  
      x = check_float(x)
      sigma = check_float(sigma)
  
      return -0.5 * (x / sigma) ** 2 * mex_hat(y, sigma)
docs: r"""Directional Mexican hat
  
      This method implements a directional Mexican hat (or Ricker) wavelet.
  
      Parameters
      ----------
      x : float
          Input data point for Gaussian
      y : float
          Input data point for Mexican hat
      sigma : float
          Standard deviation (filter scale)
  
      Returns
      -------
      float directional Mexican hat filtered data point
  
      Examples
      --------
      >>> from modopt.signal.filter import mex_hat_dir
      >>> mex_hat_dir(1, 2, 1)
      0.17606952612856686