Ë
    âQ(h  ã                   ó\   — d dl Z d dlZd dlmZmZmZ d dlmc m	c m
Z g d¢Zdd„Zd„ Zd„ Zy)é    N)ÚfftshiftÚ	ifftshiftÚfftfreq)r   r   r   ÚrfftfreqÚnext_fast_lenc                 ó¶   — t        j                  | «      } | dk  rt        d| › d�«      ‚t        j                  d| dz   t
        ¬«      dz  t        | |z  «      z  S )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
    --------
    >>> import numpy as np
    >>> 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.  ])

    r   zn = z/ is not valid. n must be a nonnegative integer.é   )Údtypeé   )ÚoperatorÚindexÚ
ValueErrorÚnpÚarangeÚintÚfloat)ÚnÚds     úS/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/scipy/fftpack/_helper.pyr   r      sb   € ôF 	�‰�qÓ€AØˆ1‚uÜ˜4 ˜sð #<ð <ó =ð 	=ô �I‰I�a˜˜Q™¤cÔ*¨aÑ/´5¸¸Q¹³<Ñ?Ð?ó    c                 ó.   — t        j                  | d«      S )a  
    Find the next fast size of input data to `fft`, for zero-padding, etc.

    SciPy's FFTPACK has efficient functions for radix {2, 3, 4, 5}, so this
    returns the next composite of the prime factors 2, 3, and 5 which is
    greater than or equal to `target`. (These are also known as 5-smooth
    numbers, regular numbers, or Hamming numbers.)

    Parameters
    ----------
    target : int
        Length to start searching from. Must be a positive integer.

    Returns
    -------
    out : int
        The first 5-smooth number greater than or equal to `target`.

    Notes
    -----
    .. versionadded:: 0.18.0

    Examples
    --------
    On a particular machine, an FFT of prime length takes 133 ms:

    >>> from scipy import fftpack
    >>> import numpy as np
    >>> rng = np.random.default_rng()
    >>> min_len = 10007  # prime length is worst case for speed
    >>> a = rng.standard_normal(min_len)
    >>> b = fftpack.fft(a)

    Zero-padding to the next 5-smooth length reduces computation time to
    211 us, a speedup of 630 times:

    >>> fftpack.next_fast_len(min_len)
    10125
    >>> b = fftpack.fft(a, 10125)

    Rounding up to the next power of 2 is not optimal, taking 367 us to
    compute, 1.7 times as long as the 5-smooth size:

    >>> b = fftpack.fft(a, 16384)

    T)Ú_helperÚ	good_size)Útargets    r   r   r   6   s   € ô` ×Ñ˜V TÓ*Ð*r   c                 ó’   — |�D|€Bt        j                  |d«      }t        |«      t        j                  | «      k7  rt        d«      ‚|S )zŠEnsure that shape argument is valid for scipy.fftpack

    scipy.fftpack does not support len(shape) < x.ndim when axes is not given.
    ÚshapezBwhen given, axes and shape arguments have to be of the same length)r   Ú_iterable_of_intÚlenr   Úndimr   )Úxr   Úaxess      r   Ú_good_shaper"   i   sK   € ð
 Ð˜T˜\Ü×(Ñ(¨°Ó8ˆÜˆu‹:œŸ™ ›Ò#Üð >ó ?ð ?à€Lr   )g      ð?)r   Únumpyr   Ú	numpy.fftr   r   r   Úscipy.fft._pocketfft.helperÚfftÚ
_pocketfftÚhelperr   Ú__all__r   r   r"   © r   r   ú<module>r+      s.   ðÛ ã ß 2Ñ 2ç -Ó -â
K€ó(@òV0+óf
r   