Hi all, I am trying to calculate the 2nd-order gradient numerically of an array in numpy.
import numpy as np a = np.sin(np.arange(0, 10, .01)) da = np.gradient(a) dda = np.gradient(da) This is what I come up. Is the the way it should be done? I am asking this, because in numpy there isn't an option saying np.gradient(a, order=2). I am concerned about whether this usage is wrong, and that is why numpy does not have this implemented. Thank you! -Shawn -- Yuxiang "Shawn" Wang Gerling Research Lab University of Virginia yw...@virginia.edu +1 (434) 284-0836 https://sites.google.com/a/virginia.edu/yw5aj/ _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion