
    /jJ	                    V    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e          Z	dS )    )annotationsN)Base)expectc                  n    e Zd Zedd            Zedd            Zedd            Zedd            ZdS )	GatherreturnNonec                    t           j                            dddgdgd          } t          j                            ddd	d
                              t          j                  }t          j        g d          }t          j	        ||d          }t          | ||                    t          j                  g|g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   s       g/home/longshao/multi-rider-rag/.venv/lib/python3.11/site-packages/onnx/backend/test/case/node/gather.pyexport_gather_0zGather.export_gather_0       {$$I&E	 % 
 
 yq!Q**11"*==(999%%GD'***'..223C 		
 	
 	
 	
 	
 	
    c                    t           j                            dddgdgd          } t          j                            ddd	d
                              t          j                  }t          j        g d          }t          j	        ||d          }t          | ||                    t          j                  g|gd           d S )Nr   r   r   r   r   r   r   r   r   r   r   r   test_gather_1r   r   r(   s       r*   export_gather_1zGather.export_gather_1!   r,   r-   c                    t           j                            dddgdgd          } t          j                            dd                              t          j                  }t          j        dd	gg          }t          j	        ||d
          }t          | ||                    t          j                  g|gd           d S )Nr   r   r   r   r   r   r   r   r   r   test_gather_2d_indicesr   r   r(   s       r*   export_gather_2d_indiceszGather.export_gather_2d_indices4   s    {$$I&E	 % 
 
 yq!$$++BJ77(QF8$$GD'***'..223C)		
 	
 	
 	
 	
 	
r-   c                 t   t           j                            dddgdgd          } t          j        d                              t          j                  }t          j        g d          }t          j        ||d	          }t          | ||                    t          j
                  g|g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(   s       r*   export_gather_negative_indicesz%Gather.export_gather_negative_indicesG   s    {$$I&E	 % 
 
 y}}##BJ//(<<<((GD'***
 	'..223C/		
 	
 	
 	
 	
 	
r-   N)r   r	   )__name__
__module____qualname__staticmethodr+   r0   r3   r8    r-   r*   r   r      s        
 
 
 \
$ 
 
 
 \
$ 
 
 
 \
$ 
 
 
 \
 
 
r-   r   )

__future__r   numpyr    r   onnx.backend.test.case.baser   onnx.backend.test.case.noder   r   r=   r-   r*   <module>rB      s    # " " " " "      , , , , , , . . . . . .N
 N
 N
 N
 N
T N
 N
 N
 N
 N
r-   