o
    soiJ	                     @  sH   d dl mZ d dlZd dlZd dlmZ d dlmZ G dd deZ	dS )    )annotationsN)Base)expectc                   @  sD   e Zd ZedddZedddZedddZedd	d
ZdS )GatherreturnNonec                  C  t   t jjdddgdgdd} tjddd	d
tj}tg d}tj	||dd}t
| ||tjg|gdd d S )Nr   dataindicesyr   inputsoutputsaxis            r      r   r   test_gather_0r   r   nameonnxhelper	make_nodenprandomrandnastypefloat32arraytaker   int64noder	   r
   r    r(   V/home/ubuntu/.local/lib/python3.10/site-packages/onnx/backend/test/case/node/gather.pyexport_gather_0      
zGather.export_gather_0c                  C  r   )Nr   r	   r
   r   r   r   r   r   r   r   r   r   test_gather_1r   r   r&   r(   r(   r)   export_gather_1!   r+   zGather.export_gather_1c                  C  sr   t jjdddgdgdd} tjddtj}tdd	gg}tj	||dd
}t
| ||tjg|gdd d S )Nr   r	   r
   r   r   r   r   r   r   r   test_gather_2d_indicesr   r   r&   r(   r(   r)   export_gather_2d_indices4   s   
zGather.export_gather_2d_indicesc                  C  sl   t jjdddgdgdd} tdtj}tg d}tj||dd	}t	| ||tj
g|gd
d d S )Nr   r	   r
   r   r   r   
   )r   iir   test_gather_negative_indicesr   )r   r   r   r   aranger!   r"   r#   r$   r   r%   r&   r(   r(   r)   export_gather_negative_indicesG   s   
z%Gather.export_gather_negative_indicesN)r   r   )__name__
__module____qualname__staticmethodr*   r-   r/   r3   r(   r(   r(   r)   r      s    r   )

__future__r   numpyr   r   onnx.backend.test.case.baser   onnx.backend.test.case.noder   r   r(   r(   r(   r)   <module>   s   