
    /j                    ^    d dl mZ d dlZd dlmZ  G d de          Z G d de          ZdS )    )annotationsN)OpRunReduceNumpyc                      e Zd ZddZdS )ReduceMean_1Nc                    |t          |          nd }t          j        ||||j                  }|dk    r.t	          |t          j                  st          j        |          }|fS )Naxiskeepdimsdtyper   )tuplenpmeanr   
isinstancendarrayarray)selfdataaxesr
   ress        f/home/longshao/multi-rider-rag/.venv/lib/python3.11/site-packages/onnx/reference/ops/op_reduce_mean.py_runzReduceMean_1._run   s]    ".uT{{{Dgd
KKK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dS )ReduceMean_18N   r   c           
     H   |                      ||          }|dk    }	 t          j        ||||j                  }|dk    r.t	          |t          j                  st          j        |          }n1# t          $ r$}t          d|j        d|d| d          |d }~ww xY w|fS )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   zReduceMean_18._run   s    &:;;q=	'$THDJOOOC1}}ZRZ%@%@}hsmm 	 	 	d$*dd4ddYaddd 	 vs   AA0 0
B:BB)Nr    r   r   r   r   r   r   r      s(             r   r   )
__future__r   numpyr   onnx.reference.ops._opr   r   r   r   r   r   <module>r+      s    # " " " " "     3 3 3 3 3 3    #       $     r   