[SciPy-User] Partial Derivative of a 3 dimensional NumPy array

Zachary Pincus zachary.pincus at yale.edu
Thu Jun 16 08:58:27 EDT 2011


Check out numpy.gradient -- uses central differences in the interior and the first difference on the edges. It gives gradients in all directions from one call.

Zach


On Jun 16, 2011, at 8:01 AM, Andreas Hasenkopf wrote:

> Hello,
> as part of a little simulation I try to calculate partial derivatives of
> a 3D array (dering along of one of the three axes).
> My question is: Is there a simple way to do it? Or do I need to iterate
> over each 1D subslice of the array and call e.g. scipy.fftpack.diff() on
> each of those subslices?
> 
> Thanks and CU
> Andi
> 
> -- 
> Andreas Hasenkopf
> Phone: +49 151 11728439
> Homepage: http://www.hasenkopf2000.net
> GPG Pub Key: http://goo.gl/4mOsM
> 
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user




More information about the SciPy-User mailing list