
    Si                    P    S SK Jr  S SKrS SKJr   " S S\5      r " S S\5      rg)    )annotationsN)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        _/var/www/html/ai-image-ml/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           
     H   U R                  X$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)Nr	   r   zUnable to reduce shape z with axes=z and keepdims=.)	handle_axesr   r   r   r   r   r   	TypeErrorshape)r   r   r   r   noop_with_empty_axesr   es          r   r   ReduceSum_13._run   s    ;
	&&HC1}ZRZZ%@%@hhsm 6M  	)!''Kx~V^U__`a	s   AA0 0
B!:"BB!r   )NNNr   r   r   r   r#   r#      s    r   r#   )
__future__r   numpyr   onnx.reference.ops._opr   r   r#   r   r   r   <module>r0      s*    #  3" # r   