
    bIgf                    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                      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
y)
CumSumc                 l   t         j                  j                  dddgdg      } t        j                  g d      j                  t        j                        }t        j                  d      }t        j                  g d      j                  t        j                        }t        | ||g|gd	
       y )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/answerous/venv/lib/python3.12/site-packages/onnx/backend/test/case/node/cumsum.pyexport_cumsum_1dzCumSum.export_cumsum_1d   s    {{$$XsFmcU$SHH./66rzzBxx{HH0188DtQIs9IJ    c                 n   t         j                  j                  dddgdgd      } t        j                  g d      j                  t        j                        }t        j                  d      }t        j                  g d	      j                  t        j                        }t        | ||g|gd
       y )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 % 
 HH./66rzzBxx{HH/077

CtQIs9STr(   c                 n   t         j                  j                  dddgdgd      } t        j                  g d      j                  t        j                        }t        j                  d      }t        j                  g d	      j                  t        j                        }t        | ||g|gd
       y )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 % 
 HH./66rzzBxx{HH1299"**EtQIs9QRr(   c                 p   t         j                  j                  dddgdgdd      } t        j                  g d      j                  t        j                        }t        j                  d      }t        j                  g d	      j                  t        j                        }t        | ||g|gd
       y )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 % 
 HH./66rzzBxx{HH0188D!TQC6X	
r(   c                    t         j                  j                  dddgdg      } t        j                  g d      j                  t        j                        j                  d      }t        j                  d      }t        j                  g d	      j                  t        j                        j                  d      }t        | ||g|gd
       y )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_06   s    {{$$=E % 

 HH34;;BJJGOOPVWxx{HH34;;BJJGOOPVWtQIs9PQr(   c                    t         j                  j                  dddgdg      } t        j                  g d      j                  t        j                        j                  d      }t        j                  d      }t        j                  g d	      j                  t        j                        j                  d      }t        | ||g|gd
       y )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_1B   s    {{$$=E % 

 HH34;;BJJGOOPVWxx{HH45<<RZZHPPQWXtQIs9PQr(   c                    t         j                  j                  dddgdg      } t        j                  g d      j                  t        j                        j                  d      }t        j                  d      }t        j                  g d	      j                  t        j                        j                  d      }t        | ||g|gd
       y )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_axisN   s    {{$$=E % 

 HH34;;BJJGOOPVWxx|HH45<<RZZHPPQWXtQIs9WXr(   N)returnNone)__name__
__module____qualname__staticmethodr'   r.   r5   r8   rA   rE   rI    r(   r&   r   r      s    K K U U S S 	
 	
 	R 	R 	R 	R 	Y 	Yr(   r   )

__future__r   numpyr   r   onnx.backend.test.case.baser   onnx.backend.test.case.noder   r   rP   r(   r&   <module>rU      s&    #   , .KYT KYr(   