
    Si                    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                      \ 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S j5       r	\SS j5       r
\SS j5       r\SS	 j5       rS
rg)Slice   c                     [         R                  R                  S/ SQS/S9n [        R                  R                  SSS5      R                  [        R                  5      nUSS	2SS24   n[        R                  " SS/[        R                  S
9n[        R                  " S	S/[        R                  S
9n[        R                  " SS/[        R                  S
9n[        R                  " SS/[        R                  S
9n[        XX4XV/U/SS9  g )Nr   xstartsendsaxesstepsyinputsoutputs   
      r      dtype   
test_slicer   r   nameonnxhelper	make_nodenprandomrandnastypefloat32arrayint64r   )noder   r   r   r   r   r   s          `/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/onnx/backend/test/case/node/slice.pyexport_sliceSlice.export_slice   s    {{$$;E % 
 IIOOBA&--bjj9ac1R4iL1a&1xxBrxx0xxAbhh/!Qrxx0V47!<	
    c                    [         R                  R                  S/ SQS/S9n [        R                  R                  SSS5      R                  [        R                  5      n[        R                  " S/[        R                  S	9n[        R                  " S
/[        R                  S	9n[        R                  " S/[        R                  S	9n[        R                  " S/[        R                  S	9nUS S 2SS
24   n[        U XX4U/U/SS9  g )Nr   r
   r   r   r   r   r   r   r   r   test_slice_negr   r   r)   r   r   r   r   r   r   s          r*   export_slice_negSlice.export_slice_neg!   s    {{$$;E % 
 IIOOBA&--bjj91#RXX.xxBHH-xx288,!BHH-a2gJt51C!		
r-   c                    [         R                  R                  S/ SQS/S9n [        R                  R                  SSS5      R                  [        R                  5      n[        R                  " S/[        R                  S	9n[        R                  " S/[        R                  S	9n[        R                  " S
/[        R                  S	9n[        R                  " S
/[        R                  S	9nUS S 2SS24   n[        U XX4U/U/SS9  g )Nr   r
   r   r   r   r   r     r   r   test_slice_start_out_of_boundsr   r   r1   s          r*    export_slice_start_out_of_bounds&Slice.export_slice_start_out_of_bounds7   s    {{$$;E % 
 IIOOBA&--bjj94&1xxbhh/xx288,!BHH-adlOt51C1		
r-   c                    [         R                  R                  S/ SQS/S9n [        R                  R                  SSS5      R                  [        R                  5      n[        R                  " S/[        R                  S	9n[        R                  " S
/[        R                  S	9n[        R                  " S/[        R                  S	9n[        R                  " S/[        R                  S	9nUS S 2SS
24   n[        U XX4U/U/SS9  g )Nr   r
   r   r   r   r   r   r   r   r5   test_slice_end_out_of_boundsr   r   r1   s          r*   export_slice_end_out_of_bounds$Slice.export_slice_end_out_of_boundsM   s    {{$$;E % 
 IIOOBA&--bjj91#RXX.xxbhh/xx288,!BHH-a4iLt51C/		
r-   c                    [         R                  R                  S/ SQS/S9n [        R                  R                  SSS5      R                  [        R                  5      n[        R                  " / SQ[        R                  S	9n[        R                  " / S
Q[        R                  S	9nUS S 2S S 2SS24   n[        XX#/U/SS9  g )Nr   )r   r   r   r   r   r   r   r   r   r   r   r   r   r      r   r@   test_slice_default_axesr   r   )r)   r   r   r   r   s        r*   export_slice_default_axesSlice.export_slice_default_axesc   s    {{$$*E % 
 IIOOBA&--bjj9)2884xx2884aAaCiLV*QC>W	
r-   c                    [         R                  R                  S/ SQS/S9n [        R                  R                  SSS5      R                  [        R                  5      n[        R                  " / SQ[        R                  S	9n[        R                  " / S
Q[        R                  S	9n[        R                  " / SQ[        R                  S	9nUS S 2S S 2SS24   n[        U XX4/U/SS9  g )Nr   r   r   r   r   r   r   r   r   r   r>   r   r?   r   r      r   r@   test_slice_default_stepsr   r   r)   r   r   r   r   r   s         r*   export_slice_default_steps Slice.export_slice_default_stepst   s    {{$$2E % 
 IIOOBA&--bjj9)2884xx2884xx	2aAaCiLt*C+		
r-   c                 N   [         R                  R                  S/ SQS/S9n [        R                  R                  SSS5      R                  [        R                  5      n[        R                  " / SQ[        R                  S	9n[        R                  " / S
Q[        R                  S	9n[        R                  " / SQ[        R                  S	9n[        R                  " / SQ5      R                  [        R                  5      nUSSS2SSS2SSS24   n[        U XX4U/U/SS9  g )Nr   r
   r   r   r   r   r   r?   r   )r   r   r   rF   )r/   r   r/   rM   r@   r   rN   test_slice_neg_stepsr   r   r1   s          r*   export_slice_neg_stepsSlice.export_slice_neg_steps   s    {{$$;E % 
 IIOOBA&--bjj9+RXX6xx	2xx	2&--bhh7b2gr!Bw!B&'t51C'		
r-   c                    [         R                  R                  S/ SQS/S9n [        R                  R                  SSS5      R                  [        R                  5      n[        R                  " / SQ[        R                  S	9n[        R                  " / S
Q[        R                  S	9n[        R                  " / SQ[        R                  S	9nUS S 2S S 2SS24   n[        U XX4/U/SS9  g )Nr   rE   r   r   r   r   r   r>   r   r?   )r   rN   r/   r   r@   test_slice_negative_axesr   r   rI   s         r*   export_slice_negative_axes Slice.export_slice_negative_axes   s    {{$$2E % 
 IIOOBA&--bjj9)2884xx2884xx2884aAaCiLt*C+		
r-    N)returnNone)__name__
__module____qualname____firstlineno__staticmethodr+   r2   r7   r;   rB   rJ   rP   rT   __static_attributes__rV   r-   r*   r   r      s    
 
$ 
 
* 
 
* 
 
* 
 
  
 
( 
 
* 
 
r-   r   )

__future__r   numpyr"   r   onnx.backend.test.case.baser   onnx.backend.test.case.noder   r   rV   r-   r*   <module>rc      s$    #   , .e
D e
r-   