The VI model for nonlinear fitting allows the calculation of partial derivatives, eliminating the built-in substitution of numerical derivatives that occurs if the derivatives are not provided. Often is it not worth to calculate the partial derivatives in the model, due to the additional complexity and possibilities of mistakes. In rare cases, analytical partial derivatives can give a slight advantage in accuracy and speed.
The documentation on this is a little sparse and all we really know is that the output is a 2D array.
So let's clear up the mistery and explain how the data in the 2D array needs to be arranged.
The partial derivatives output f'(X,a) is a 2D array with one column per fitting parameter and one row for each datapoint in the model function.
This means that you get the correct arrangement if the function and partial derivatives are calculated point-by-point in a FOR loop (old way). However, if you operate directly on the X array without the need for a FOR loop (typical way), the resulting 2D array needs to be transposed.
here is an image of the two possibilities:
Note that the loop-free version is often more efficient due to better use of SSE instructions and it typically results in cleaner code.