I know that for a 1D function, I can calculate the numerical derivative at every point, $\DeclareMathOperator{\d}{d\!} (x_1,y_1)$, with $\d y/\d x$ where $\d y = y_2 - y_0$ and $\d x = x_2 - x_0$. If my step size is small enough, the slope can be approximated as linear.
I know that the derivative of a tensor, say $A$, with dimensions $n\times n$, with respect to another tensor, say $B$, with dimensions $n\times n$, will yield a 4th rank tensor of dimension $n\times n\times n\times n$.
The question is on extending the linear approximation to tensor:
If I just want a rough estimate of the derivative of $A$ with respect to $B$, $\d A/\d B$, is it ok to calculate the components of $\d A/\d B$ following the numerical differentiation formula above? I.e. for $n = 6$, I have: $$ \begin{matrix} \dfrac{\d A}{\d B}(1,1,1,1) = \dfrac{A_2(1,1) - A_1(1,1)}{B_2(1,1) - B_1(1,1)}\\ \dfrac{\d A}{\d B}(1,2,1,1) = \dfrac{A_2(1,2) - A_1(1,2)}{B_2(1,1) - B_1(1,1)}\\ \dfrac{\d A}{\d B}(1,3,1,1) = \dfrac{A_2(1,3) - A_1(1,3)}{B_2(1,1) - B_1(1,1)} \end{matrix} $$ ... and so on, where $A_1$ and $A_2$ are the tensors $A$ at two consecutive time steps.
Thanks in advance!