scipy.fftpack.diff

scipy.fftpack.diff(x, order=1, period=None, _cache={})

diff(x, order=1, period=2*pi) -> y

Return k-th derivative (or integral) of a periodic sequence x.

If x_j and y_j are Fourier coefficients of periodic functions x and y, respectively, then

y_j = pow(sqrt(-1)*j*2*pi/period, order) * x_j y_0 = 0 if order is not 0.
Optional input:
order
The order of differentiation. Default order is 1. If order is negative, then integration is carried out under the assumption that x_0==0.
period
The assumed period of the sequence. Default is 2*pi.
Notes:
If sum(x,axis=0)=0 then
diff(diff(x,k),-k)==x (within numerical accuracy)

For odd order and even len(x), the Nyquist mode is taken zero.

Previous topic

scipy.fftpack.irfft

Next topic

scipy.fftpack.tilbert

This Page