
    h,                     D    S SK rS SKJr   " S S\5      r " S S\5      rg)    N)OpRunReduceNumpyc                       \ rS rSrSS jrSrg)ReduceSum_1   Nc                     Ub  [        U5      OS n[        R                  " XX1R                  S9nUS:X  a5  [	        U[        R
                  5      (       d  [        R                  " U5      nU4$ )Naxiskeepdimsdtyper   )tuplenpsumr   
isinstancendarrayarray)selfxaxesr
   ress        Z/var/www/fran/franai/venv/lib/python3.13/site-packages/onnx/reference/ops/op_reduce_sum.py_runReduceSum_1._run   sQ    ".uT{DffQHGGDq=C!<!<((3-Cv     )NN__name__
__module____qualname____firstlineno__r   __static_attributes__r   r   r   r   r      s    r   r   c                       \ rS rSrSS jrSrg)ReduceSum_13   Nc           
         Ub  UR                   S:X  a
  U(       a  U4$ U R                  U5      n [        R                  " XX1R                  S9nUS:X  a5  [        U[        R                  5      (       d  [        R                  " U5      nU4$ ! [         a'  n[        SUR                   < SU< SU S35      UeS nAff = f)N)r   r   r   zUnable to reduce shape z with axes=z and keepdims=.)	shapehandle_axesr   r   r   r   r   r   	TypeError)r   r   r   r
   noop_with_empty_axesr   es          r   r   ReduceSum_13._run   s    LDJJ$.4H4K%		&&HC1}ZRZZ%@%@hhsm6M 	)!''Kx~V^U__`a	s   AB 
B>"B99B>r   )NNNr   r   r   r   r"   r"      s    r   r"   )numpyr   onnx.reference.ops._opr   r   r"   r   r   r   <module>r.      s'     3" # r   