at least 3 continuous derivatives), and the estimation can be
   improved by providing closer samples. Mathematically, the value at
   each interior point of a partial derivative is estimated using
   Taylorâs theorem with remainder. Letting x be an interior point and
   x+h_r be point neighboring it, the partial gradient at f(x+h_r) is
   estimated using:
  \begin{aligned}     f(x+h_r) = f(x) + h_r f'(x) + {h_r}^2
  \frac{f''(x)}{2} + {h_r}^3 \frac{f'''(x_r)}{6} \\ \end{aligned}

where x_r is a number in the interval [x, x+ h_r]  and using the
   fact that f \in C^3 we derive :
  f'(x) \approx \frac{ {h_l}^2 f(x+h_r) - {h_r}^2 f(x-h_l)       +
  ({h_r}^2-{h_l}^2 ) f(x) }{ {h_r} {h_l}^2 + {h_r}^2 {h_l} }

Note:
 We estimate the gradient of functions in complex domain g :
 \mathbb{C}^n \rightarrow \mathbb{C} in the same way.

The value of each partial derivative at the boundary points is
   computed differently. See edge_order below.
Parameters: