
    bIg^                    P    d dl mZ d dlZd dlmZ  G d de      Z G d de      Zy)    )annotationsN)OpRunReduceNumpyc                      e Zd ZddZy)ReduceSum_1Nc                    |t        |      nd }t        j                  ||||j                        }|dk(  r/t	        |t        j
                        st        j                  |      }|fS )Naxiskeepdimsdtyper   )tuplenpsumr   
isinstancendarrayarray)selfxaxesr
   ress        ]/var/www/html/answerous/venv/lib/python3.12/site-packages/onnx/reference/ops/op_reduce_sum.py_runzReduceSum_1._run   sR    ".uT{DffQTHAGGDq=C!<((3-Cv    )NN__name__
__module____qualname__r    r   r   r   r      s    r   r   c                      e Zd ZddZy)ReduceSum_13Nc           
     h   ||j                   dk(  r|r|fS | j                  |      }	 t        j                  ||||j                        }|dk(  r/t        |t        j                        st        j                  |      }|fS # t        $ r%}t        d|j                   d|d| d      |d }~ww xY w)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   zReduceSum_13._run   s    LDJJ$.4H4K%		&&HC1}ZRZZ%@hhsm6M 	)!''Kx~V^U__`a	s   AB 	B1 B,,B1)NNNr   r   r   r   r   r      s    r   r   )
__future__r   numpyr   onnx.reference.ops._opr   r   r   r   r   r   <module>r*      s*    #  3" # r   