U
    q±Ëh  ã                   @  sH   d dl mZ d dlZd dlmZ dddddœdd	„ZG d
d„ deƒZdS )é    )ÚannotationsN)ÚOpRunç      ð?z
np.ndarrayÚfloat)ÚxÚalphaÚreturnc                 C  s2   t  d| ¡}t  d|t  | | ¡d  ¡}|| S )Nr   é   )ÚnpÚmaximumZminimumÚexp)r   r   Zpositive_inputZnegative_input© r   ú>/tmp/pip-unpacked-wheel-xnis5xre/onnx/reference/ops/op_celu.pyÚ_vcelu1   s    r   c                   @  s   e Zd Zddd„ZdS )ÚCeluNc                 C  s   t ||ƒ |j¡fS )N)r   ZastypeZdtype)Úselfr   r   r   r   r   Ú_run   s    z	Celu._run)N)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s   r   )r   )Ú
__future__r   Znumpyr
   Zonnx.reference.op_runr   r   r   r   r   r   r   Ú<module>   s   