
    Ng'	                     J    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 )    N)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returnNc                     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       ^/var/www/html/ai-engine/env/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_indices3   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_indicesF   s    {$$I&E	 % 
 
 y}}##BJ//(<<<((GD'***
 	'..223C/		
 	
 	
 	
 	
 	
r+   )r   N)__name__
__module____qualname__staticmethodr)   r.   r1   r6    r+   r(   r   r      s        
 
 
 \
$ 
 
 
 \
$ 
 
 
 \
$ 
 
 
 \
 
 
r+   r   )numpyr   r   onnx.backend.test.case.baser   onnx.backend.test.case.noder   r   r;   r+   r(   <module>r?      s~   
      , , , , , , . . . . . .N
 N
 N
 N
 N
T N
 N
 N
 N
 N
r+   