[SciPy-user] Second order differencing, periodic functions

"Johannes Löhnert" a.u.r.e.l.i.a.n at gmx.net
Tue Mar 21 06:38:12 CST 2006


Hi,

I want to calculate the 2nd derivative of a periodic function. If I have the

values given as array f_arr, I would like to do this with 2nd order 
differencing. For a non-periodic function I could use

d2f = convolve(f_arr, array([-.25, .5, -.25]), mode=2),

but with this approach f_arr is zero-padded. Is there a similar function for

periodic boundary conditions for f_arr? I know about fftpack.diff, but I
would rather use SOD, since diff yields "strange" results for non-contiguous
functions.

Best Regards,
Johannes Loehnert

-- 
Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl



More information about the SciPy-user mailing list