
    NgC                     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                       e Zd Zed
d            Zed
d            Zed
d            Zed
d            Zed
d            Zed
d            Z	ed
d	            Z
dS )CumSumreturnNc                  p   t           j                            dddgdg          } t          j        g d                              t          j                  }t          j        d          }t          j        g d                              t          j                  }t          | ||g|gd	
           d S )Nr   xaxisyinputsoutputs      ?       @      @      @      @r   )r   r         @      $@      .@test_cumsum_1dr   r   name	onnxhelper	make_nodenparrayastypefloat64int32r   noder	   r
   r   s       ^/var/www/html/ai-engine/env/lib/python3.11/site-packages/onnx/backend/test/case/node/cumsum.pyexport_cumsum_1dzCumSum.export_cumsum_1d   s    {$$XsFmcU$SSH...//66rzBBx{{H0001188DDtQIs9IJJJJJJ    c                  r   t           j                            dddgdgd          } t          j        g d                              t          j                  }t          j        d          }t          j        g d	                              t          j                  }t          | ||g|gd
           d S )Nr   r	   r
   r      )r   r   	exclusiver   r   )        r   r   r   r   test_cumsum_1d_exclusiver   r   r$   s       r&   export_cumsum_1d_exclusivez!CumSum.export_cumsum_1d_exclusive   s    {$$c6]SEQ % 
 
 H...//66rzBBx{{H///0077
CCtQIs9STTTTTTr(   c                  r   t           j                            dddgdgd          } t          j        g d                              t          j                  }t          j        d          }t          j        g d	                              t          j                  }t          | ||g|gd
           d S )Nr   r	   r
   r   r*   )r   r   reverser   r   )r         ,@      (@      "@r   test_cumsum_1d_reverser   r   r$   s       r&   export_cumsum_1d_reversezCumSum.export_cumsum_1d_reverse   s    {$$c6]SE1 % 
 
 H...//66rzBBx{{H1112299"*EEtQIs9QRRRRRRr(   c                  t   t           j                            dddgdgdd          } t          j        g d                              t          j                  }t          j        d          }t          j        g d	                              t          j                  }t          | ||g|gd
           d S )Nr   r	   r
   r   r*   )r   r   r0   r+   r   r   )r1   r2   r3   r   r,    test_cumsum_1d_reverse_exclusiver   r   r$   s       r&   "export_cumsum_1d_reverse_exclusivez)CumSum.export_cumsum_1d_reverse_exclusive)   s    {$$c6]SE1PQ % 
 
 H...//66rzBBx{{H0001188DD!TQC6X	
 	
 	
 	
 	
 	
r(   c                     t           j                            dddgdg          } t          j        g d                              t          j                                      d          }t          j        d          }t          j        g d	                              t          j                                      d          }t          | ||g|gd
           d S )Nr   r	   r
   r   r   r   r   r   r   r   r         r   )r   r   r   r   g      @r3   test_cumsum_2d_axis_0r   
r   r   r   r   r    r!   r"   reshaper#   r   r$   s       r&   export_cumsum_2d_axis_0zCumSum.export_cumsum_2d_axis_05   s    {$$=E % 
 

 H33344;;BJGGOOPVWWx{{H33344;;BJGGOOPVWWtQIs9PQQQQQQr(   c                     t           j                            dddgdg          } t          j        g d                              t          j                                      d          }t          j        d          }t          j        g d	                              t          j                                      d          }t          | ||g|gd
           d S )Nr   r	   r
   r   r   r:   r;   r*   r   r   r   r   r3   r   test_cumsum_2d_axis_1r   r?   r$   s       r&   export_cumsum_2d_axis_1zCumSum.export_cumsum_2d_axis_1A   s    {$$=E % 
 

 H33344;;BJGGOOPVWWx{{H44455<<RZHHPPQWXXtQIs9PQQQQQQr(   c                     t           j                            dddgdg          } t          j        g d                              t          j                                      d          }t          j        d          }t          j        g d	                              t          j                                      d          }t          | ||g|gd
           d S )Nr   r	   r
   r   r   r:   r;   rC   test_cumsum_2d_negative_axisr   r?   r$   s       r&   export_cumsum_2d_negative_axisz%CumSum.export_cumsum_2d_negative_axisM   s    {$$=E % 
 

 H33344;;BJGGOOPVWWx||H44455<<RZHHPPQWXXtQIs9WXXXXXXr(   )r   N)__name__
__module____qualname__staticmethodr'   r.   r5   r8   rA   rE   rI    r(   r&   r   r      s       K K K \K U U U \U S S S \S 	
 	
 	
 \	
 	R 	R 	R \	R 	R 	R 	R \	R 	Y 	Y 	Y \	Y 	Y 	Yr(   r   )numpyr   r   onnx.backend.test.case.baser   onnx.backend.test.case.noder   r   rN   r(   r&   <module>rR      s   
      , , , , , , . . . . . .KY KY KY KY KYT KY KY KY KY KYr(   