U
    qh'                     @  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 )HammingWindowzReturns :math:`\\omega_n = \\alpha - \\beta \\cos \\left( \\frac{\\pi n}{N-1} \\right)` where *N* is the window length.

    See `hamming_window <https://pytorch.org/docs/stable/generated/torch.hamming_window.html>`_.
    `alpha=0.54, beta=0.46`
    Nc           	      C  sL   |  |||\}}d}d| }|t|tj d | |  }| |||S )Ng,d?      )Z_beginnpcospiZ_end)	selfsizeZoutput_datatypeZperiodicniZN_1alphabetares r   H/tmp/pip-unpacked-wheel-xnis5xre/onnx/reference/ops/op_hamming_window.py_run   s
     zHammingWindow._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   