code: def cdf2prob_grid(cdf, prepend=0):
      """Cell probabilities from cumulative probabilities on a grid.
  
      Parameters
      ----------
      cdf : array_like
          Grid of cumulative probabilities with same shape as probs.
  
      Returns
      -------
      probs : ndarray
          Rectangular grid of cell probabilities.
  
      """
      if prepend is None:
          prepend = np._NoValue
      prob = np.asarray(cdf).copy()
      k = prob.ndim
      for i in range(k):
          prob = np.diff(prob, prepend=prepend, axis=i)
  
      return prob
  
file_path: statsmodels/statsmodels/distributions/tools.py
imports: import warnings
  import numpy
  from scipy import interpolate, stats
label_desc: Use image node_id 2 for calling a global function with example usage: cdf2prob_grid(cdf, prepend) and returns: prob