U
    qh                     @  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dddZdddd	ZdS )
Concatz
np.ndarrayint)aaxisreturnc                 C  sV   t |jdkrtd|d|t |jkrR|jd|d t |j   }||S |S )Nr   z&Concat: one input has an empty shape: .)   r
   )lenshapeRuntimeErrorZreshape)selfr   r   Z	new_shape r   @/tmp/pip-unpacked-wheel-xnis5xre/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npZconcatenate)r   r   argsZtargsr   r   r   _run   s    zConcat._run)__name__
__module____qualname__r   r   r   r   r   r   r      s   r   )
__future__r   Znumpyr   Zonnx.reference.op_runr   r   r   r   r   r   <module>   s   