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ZdS )SpaceToDepthNc              	   C  s   t |jdkr td|jd|j\}}}}|||| ||| |f}t||}t|ddddddg}	||| | || || f}
t|	|
|j}|fS )	N   zUnexpected shape .r               )lenshapeRuntimeErrornpZreshapeZ	transposeZastypeZdtype)selfdata	blocksizebCHWZtmpshapeZreshapedZ
transposedZ
finalshapey r   H/tmp/pip-unpacked-wheel-xnis5xre/onnx/reference/ops/op_space_to_depth.py_run   s&    
zSpaceToDepth._run)N)__name__
__module____qualname__r   r   r   r   r   r      s   r   )
__future__r   Znumpyr   Zonnx.reference.op_runr   r   r   r   r   r   <module>   s   