U
    qh                     @  sV   d dl mZ d dlmZ d dlZd dlmZ ddddddd	d
ZG dd deZ	dS )    )annotations)AnyN)OpRunz	list[Any]intz
np.ndarray)seqaxisnew_axisreturnc                 C  s8   |dkr&dd | D }t j|dd}nt j| |d}|S )N   c                 S  s   g | ]}|d t jf qS ).)npZnewaxis).0s r   N/tmp/pip-unpacked-wheel-xnis5xre/onnx/reference/ops/op_concat_from_sequence.py
<listcomp>   s     z)_concat_from_sequence.<locals>.<listcomp>)r   )r   Zconcatenate)r   r   r   Zseq2resr   r   r   _concat_from_sequence   s
    r   c                   @  s   e Zd ZdddZdS )ConcatFromSequenceNc                 C  s$   |d krt dt|||d}|fS )NzA sequence cannot be null.)r   )RuntimeErrorr   )selfr   r   r   r   r   r   r   _run   s    zConcatFromSequence._run)NN)__name__
__module____qualname__r   r   r   r   r   r      s   r   )r   )

__future__r   typingr   Znumpyr   Zonnx.reference.op_runr   r   r   r   r   r   r   <module>   s
   	