code: def get_plan_from_dual(alpha, beta, C, regul):
      
      X = alpha[:, np.newaxis] + beta - C
      return regul.delta_Omega(X)[1]
docs: Retrieve optimal transportation plan from optimal dual potentials.
  
      Parameters
      ----------
      alpha: array, shape = len(a)
      beta: array, shape = len(b)
          Optimal dual potentials.
      C: array, shape = len(a) x len(b)
          Ground cost matrix.
      regul: Regularization object
          Should implement a delta_Omega(X) method.
  
      Returns
      -------
      T: array, shape = len(a) x len(b)
          Optimal transportation plan.