Error tracing is not needed here. Now that we have seen how to write an SDE task, it is probably worth emphasizing just why this level of complication is required, and what we have gained. For example, at the lowest pixel level we need consider only the pixel values, not the dimensionality. Similarly, at the array level, we need only consider the attributes of the arrays, not their origin or fate. The philosophy is that each subroutine must be sufficiently intelligent and autonomous to allow incorporation into a higher level routine.
Short subroutines are vital for clarity.
With this multi-level approach, errors at any level are easier to spot and correct.