o
    "i
                     @  s  d dl mZ d dlZd dlZddlmZmZ ddlmZm	Z	 dd Z
e	e
d2d3ddZe	e
d2d3ddZe	e
d2d3ddZe	e
d2d3ddZe	e
d4d3ddZe	e
d4d3ddZe	e
d4d3ddZe	e
d4d3ddZe	e
d5d3ddZe	e
d5d3ddZe	e
d5d3d d!Ze	e
d5d3d"d#Ze	e
d2d3d$d%Ze	e
d2d3d&d'Ze	d6d)d*Ze	d6d+d,Ze	d7d8d.d/Ze	d7d8d0d1ZdS )9    )annotationsN   )_dtypes_impl_util)	ArrayLike
normalizerc                   s   t   fdd}|S )z>NumPy fft casts inputs to 64 bit and *returns 64-bit results*.c                   s>   |   r	t jnt j}t| |}  | g|R i |S N)Z
is_complexr   Zdefault_dtypesZcomplex_dtypeZfloat_dtyper   Zcast_if_needed)ZtensorargskwdsZtarget_dtypefunc _/var/www/html/eduruby.in/lip-sync/lip-sync-env/lib/python3.10/site-packages/torch/_numpy/fft.pywrapped   s   zupcast.<locals>.wrapped)	functoolswraps)r   r   r   r   r   upcast   s   	r   ar   c                 C  s   t jj| |||dS N)dimnorm)torchfftr   nZaxisr   r   r   r   r         r   c                 C     t jj| |||dS r   )r   r   ifftr   r   r   r   r   !   r   r   c                 C  r   r   )r   r   rfftr   r   r   r   r   '   r   r   c                 C  r   r   )r   r   irfftr   r   r   r   r    -   r   r    c                 C  r   r   )r   r   fftnr   saxesr   r   r   r   r!   3   r   r!   c                 C  r   r   )r   r   ifftnr"   r   r   r   r%   9   r   r%   c                 C  r   r   )r   r   rfftnr"   r   r   r   r&   ?   r   r&   c                 C  r   r   )r   r   irfftnr"   r   r   r   r'   E   r   r'   r   c                 C  r   r   )r   r   fft2r"   r   r   r   r*   K   r   r*   c                 C  r   r   )r   r   ifft2r"   r   r   r   r+   Q   r   r+   c                 C  r   r   )r   r   rfft2r"   r   r   r   r,   W   r   r,   c                 C  r   r   )r   r   irfft2r"   r   r   r   r-   ]   r   r-   c                 C  r   r   )r   r   hfftr   r   r   r   r.   c   r   r.   c                 C  r   r   )r   r   ihfftr   r   r   r   r/   i   r   r/         ?c                 C     t j| |S r   )r   r   fftfreqr   dr   r   r   r2   o      r2   c                 C  r1   r   )r   r   rfftfreqr3   r   r   r   r6   t   r5   r6   xc                 C  r1   r   )r   r   fftshiftr7   r$   r   r   r   r8   y   r5   r8   c                 C  r1   r   )r   r   	ifftshiftr9   r   r   r   r:   ~   r5   r:   )Nr   N)r   r   )NNN)Nr(   N)r0   r   )r7   r   )
__future__r   r   r    r   r   Z_normalizationsr   r   r   r   r   r   r    r!   r%   r&   r'   r*   r+   r,   r-   r.   r/   r2   r6   r8   r:   r   r   r   r   <module>   sp    