
    bIgJ	                    N    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	y)    )annotationsN)Base)expectc                  T    e Zd Zedd       Zedd       Zedd       Zedd       Zy)Gatherc                    t         j                  j                  dddgdgd      } t        j                  j                  ddd	d
      j                  t        j                        }t        j                  g d      }t        j                  ||d      }t        | ||j                  t        j                        g|gd       y )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/answerous/venv/lib/python3.12/site-packages/onnx/backend/test/case/node/gather.pyexport_gather_0zGather.export_gather_0       {{$$I&E	 % 
 yyq!Q*11"**=((9%GGD'*'..23C 		
    c                    t         j                  j                  dddgdgd      } t        j                  j                  ddd	d
      j                  t        j                        }t        j                  g d      }t        j                  ||d      }t        | ||j                  t        j                        g|gd       y )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                  j                  dddgdgd      } t        j                  j                  dd      j                  t        j                        }t        j                  dd	gg      }t        j                  ||d
      }t        | ||j                  t        j                        g|gd       y )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	 % 
 yyq!$++BJJ7((QF8$GGD'*'..23C)		
r+   c                 p   t         j                  j                  dddgdgd      } t        j                  d      j                  t        j                        }t        j                  g d      }t        j                  ||d	      }t        | ||j                  t        j                        g|gd
       y )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	 % 
 yy}##BJJ/((<(GGD'*
 	'..23C/		
r+   N)returnNone)__name__
__module____qualname__staticmethodr)   r.   r1   r6    r+   r(   r   r      sP    
 
$ 
 
$ 
 
$ 
 
r+   r   )

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