~ubuntu-branches/ubuntu/oneiric/python-scipy/oneiric-proposed

« back to all changes in this revision

Viewing changes to scipy/fftpack/pseudo_diffs.py

  • Committer: Bazaar Package Importer
  • Author(s): Sameer Morar
  • Date: 2011-02-03 04:28:09 UTC
  • mfrom: (9.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20110203042809-qs95kuod7723re62
Tags: 0.8.0+dfsg1-1ubuntu1
* Merge from debian experimental (LP: #696403). Remaining changes:
  - debian/patches/stdc_format_macros.patch: Fix FTBFS issue with python 2.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
252
252
_cache = {}
253
253
def sc_diff(x, a, b, period=None,
254
254
            _cache = _cache):
255
 
    """ sc_diff(x, a, b, period=2*pi) -> y
256
 
 
 
255
    """
257
256
    Return (a,b)-sinh/cosh pseudo-derivative of a periodic sequence x.
258
257
 
259
258
    If x_j and y_j are Fourier coefficients of periodic functions x
260
 
    and y, respectively, then
 
259
    and y, respectively, then::
261
260
 
262
261
      y_j = sqrt(-1)*sinh(j*a*2*pi/period)/cosh(j*b*2*pi/period) * x_j
263
262
      y_0 = 0
264
263
 
265
 
    Input:
266
 
      a,b
 
264
    Parameters
 
265
    ----------
 
266
    x : array_like
 
267
        Input array.
 
268
    a,b : float
267
269
        Defines the parameters of the sinh/cosh pseudo-differential
268
270
        operator.
269
 
      period
 
271
    period : float, optional
270
272
        The period of the sequence x. Default is 2*pi.
271
273
 
272
 
    Notes:
273
 
      sc_diff(cs_diff(x,a,b),b,a) == x
274
 
      For even len(x), the Nyquist mode of x is taken zero.
 
274
    Notes
 
275
    -----
 
276
    ``sc_diff(cs_diff(x,a,b),b,a) == x``
 
277
    For even ``len(x)``, the Nyquist mode of x is taken as zero.
 
278
 
275
279
    """
276
280
    tmp = asarray(x)
277
281
    if iscomplexobj(tmp):