Module ImportFrom alias alias alias Assign NameStore ListLoad Str Str Str Str ImportFrom alias ImportFrom alias alias alias FunctionDef arguments args NameParam NameParam defaults Num body Expr Str If BoolOpOr UnaryOpNot Call NameLoad NameLoad NameLoad CompareLt NameLoad Num body Raise Call NameLoad BinOpMod Str NameLoad Return BinOpDiv BinOpFloorDiv Call NameLoad Num BinOpAdd NameLoad Num keyword NameLoad Num Call NameLoad BinOpMult NameLoad NameLoad decorator_list
N/A __future__ division print_function absolute_import N/A __all__ N/A fftshift ifftshift fftfreq rfftfreq numpy arange numpy.fft.helper fftshift ifftshift fftfreq rfftfreq N/A N/A n d N/A 1.0 N/A N/A DFT sample frequencies (for usage with rfft, irfft).

    The returned float array contains the frequency bins in
    cycles/unit (with zero at the start) given a window length `n` and a
    sample spacing `d`::

      f = [0,1,1,2,2,...,n/2-1,n/2-1,n/2]/(d*n)   if n is even
      f = [0,1,1,2,2,...,n/2-1,n/2-1,n/2,n/2]/(d*n)   if n is odd

    Parameters
    ----------
    n : int
        Window length.
    d : scalar, optional
        Sample spacing. Default is 1.

    Returns
    -------
    out : ndarray
        The array of length `n`, containing the sample frequencies.

    Examples
    --------
    >>> from scipy import fftpack
    >>> sig = np.array([-2, 8, 6, 4, 1, 0, 3, 5], dtype=float)
    >>> sig_fft = fftpack.rfft(sig)
    >>> n = sig_fft.size
    >>> timestep = 0.1
    >>> freq = fftpack.rfftfreq(n, d=timestep)
    >>> freq
    array([ 0.  ,  1.25,  1.25,  2.5 ,  2.5 ,  3.75,  3.75,  5.  ])

     N/A N/A N/A N/A isinstance n int N/A n 0 N/A N/A N/A ValueError N/A n = %s is not valid.  n must be a nonnegative integer. n N/A N/A N/A N/A arange 1 N/A n 1 dtype int 2 N/A float N/A n d N/A