o
    toi                     @  s4   d dl mZ d dlZd dlmZ G dd deZdS )    )annotationsN)OpRunc                   @  s$   e Zd ZdddZdd	d
dZdS )Concata
np.ndarrayaxisintreturnc                 C  sV   t |jdkrtd|d|t |jkr)|jd|d t |j   }||S |S )Nr   z&Concat: one input has an empty shape: .)   r   )lenshapeRuntimeErrorreshape)selfr   r   	new_shape r   P/home/ubuntu/.local/lib/python3.10/site-packages/onnx/reference/ops/op_concat.py_preprocess   s   
zConcat._preprocessN)r   c                  s&   t  fdd|D }t| fS )Nc                 3  s    | ]	} | V  qd S )N)r   ).0r   r   r   r   r   	<genexpr>   s    zConcat._run.<locals>.<genexpr>)tuplenpconcatenate)r   r   argstargsr   r   r   _run   s   zConcat._run)r   r   r   r   r	   r   )__name__
__module____qualname__r   r   r   r   r   r   r      s    
r   )
__future__r   numpyr   onnx.reference.op_runr   r   r   r   r   r   <module>   s   