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)Ú
OpRunUnaryc                   @  s   e Zd Zddd„ZdS )ÚFlattenNc                 C  sD   |p| j }|j}|dkrdnt |d |… ¡ t¡df}| |¡fS )Nr   )é   éÿÿÿÿr   )ÚaxisÚshapeÚnpÚprodZastypeÚintZreshape)ÚselfÚxr   Úir   Z	new_shape© r   úA/tmp/pip-unpacked-wheel-xnis5xre/onnx/reference/ops/op_flatten.pyÚ_run   s    
(zFlatten._run)N)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s   r   )Ú
__future__r   Znumpyr	   Zonnx.reference.ops._opr   r   r   r   r   r   Ú<module>   s   