Hi Chris, Thank you! This is useful information. Unfortunately, I am doing this on data from a sensor and would be hard to fit to a simple polynomial while avoiding overfitting.
Thanks again! Shawn On Thu, May 1, 2014 at 7:01 PM, Chris Barker <chris.bar...@noaa.gov> wrote: > On Thu, May 1, 2014 at 3:42 PM, Christian K. <ckk...@hoc.net> wrote: > >> >> It looks like you are looking for the derivative rather than the >> gradient. Have a look at: >> >> np.diff(a, n=1, axis=-1) >> >> n is the order if the derivative. > > > depending on your use case, you may want to use a polynomial fit for a > higher order derivative: > > np.polyder() > > -Chris > > > -- > > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > chris.bar...@noaa.gov > > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion > -- 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