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)OpRunc                   @  s   e Zd ZdddZdS )GatherNc                 C  s   |j d st|}|j d s&| }|jdkrBtjd|jdfS ztj|||dfW S  tk
r   tj||t	|df Y S X d S )NZC_CONTIGUOUSr   )r   )dtype)axis)
flagsnpZascontiguousarraysizeemptyr   Ztake	TypeErrorZastypeint)selfxindicesr    r   @/tmp/pip-unpacked-wheel-xnis5xre/onnx/reference/ops/op_gather.py_run   s    



zGather._run)N)__name__
__module____qualname__r   r   r   r   r   r      s   r   )
__future__r   Znumpyr   Zonnx.reference.op_runr   r   r   r   r   r   <module>   s   