
    SiJ	                    N    S SK Jr  S SKrS SKrS SKJr  S SKJr   " S S\5      r	g)    )annotationsN)Base)expectc                  d    \ rS rSr\SS j5       r\SS j5       r\SS j5       r\SS j5       rSr	g)	Gather   c                 x   [         R                  R                  SSS/S/SS9n [        R                  R                  SSS	S
5      R                  [        R                  5      n[        R                  " / SQ5      n[        R                  " XSS9n[        U XR                  [        R                  5      /U/SS9  g )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       a/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/onnx/backend/test/case/node/gather.pyexport_gather_0Gather.export_gather_0       {{$$I&E	 % 
 yyq!Q*11"**=((9%GGD*..23C 		
    c                 x   [         R                  R                  SSS/S/SS9n [        R                  R                  SSS	S
5      R                  [        R                  5      n[        R                  " / SQ5      n[        R                  " XSS9n[        U XR                  [        R                  5      /U/SS9  g )Nr   r
   r   r   r   r   r   r   r   r   r   r   test_gather_1r   r   r'   s       r)   export_gather_1Gather.export_gather_1!   r,   r-   c                 v   [         R                  R                  SSS/S/SS9n [        R                  R                  SS5      R                  [        R                  5      n[        R                  " SS	//5      n[        R                  " XSS
9n[        U XR                  [        R                  5      /U/SS9  g )Nr   r
   r   r   r   r   r   r   r   r   test_gather_2d_indicesr   r   r'   s       r)   export_gather_2d_indicesGather.export_gather_2d_indices4   s    {{$$I&E	 % 
 yyq!$++BJJ7((QF8$GGD*..23C)		
r-   c                 `   [         R                  R                  SSS/S/SS9n [        R                  " S5      R                  [        R                  5      n[        R                  " / SQ5      n[        R                  " XSS	9n[        U XR                  [        R                  5      /U/S
S9  g )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_indices%Gather.export_gather_negative_indicesG   s    {{$$I&E	 % 
 yy}##BJJ/((<(GGD*
 	..23C/		
r-    N)returnNone)
__name__
__module____qualname____firstlineno__staticmethodr*   r0   r4   r:   __static_attributes__r<   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>rI      s$    #   , .N
T N
r-   