U
    q±Ëh®  ã                   @  s4   d dl mZ d dlZd dlmZ G dd„ deƒZdS )é    )ÚannotationsN)Ú_CommonWindowc                   @  s   e Zd ZdZddd„ZdS )Ú
HannWindowzÇReturns :math:`\\omega_n = \\sin^2\\left( \\frac{\\pi n}{N-1} \\right)` where *N* is the window length.

    See `hann_window <https://pytorch.org/docs/stable/generated/torch.hann_window.html>`_
    Nc                 C  s8   |   |||¡\}}t |tj | ¡d }|  |||¡S )Né   )Z_beginÚnpÚsinÚpiZ_end)ÚselfÚsizeZoutput_datatypeZperiodicÚniZN_1Úres© r   úE/tmp/pip-unpacked-wheel-xnis5xre/onnx/reference/ops/op_hann_window.pyÚ_run   s    zHannWindow._run)NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r      s   r   )Ú
__future__r   Znumpyr   Z$onnx.reference.ops._op_common_windowr   r   r   r   r   r   Ú<module>   s   