I have sampled functions on 2D and 3D numpy arrays and I need a way to take partial derivatives from these arrays. I could code the finite difference schemes manually, but I need more than just 2nd order accuracy, probably 4th or even sixth order. With higher accuracy orders coding it manually quickly becomes tedious, especially because I need it for arrays of different dimensions.
Is there function in numpy or scipy or some other package that can do that conveniently?