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?
You may want to take a look at the findiff package. It let's you conveniently take derivatives of numpy arrays of any dimension, any derivative order and any desired accuracy order. The project website says that it features:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With