U
    rh
                     @  sH   d dl mZ d dlZd dlZd dlmZ d dlmZ G dd deZ	dS )    )annotationsN)Base)expectc                   @  sT   e Zd ZeddddZeddddZeddddZeddd	d
ZdS )CompressNone)returnc                  C  s~   t jjdddgdgdd} tddgd	d
gddggtj}tdddg}tj||dd}t| ||t	g|gdd d S )Nr   input	conditionoutputr   inputsoutputsaxis                  r   Ztest_compress_0r   r   name
onnxhelperZ	make_nodenparrayZastypeZfloat32compressr   boolnoder   r	   r
    r!   H/tmp/pip-unpacked-wheel-xnis5xre/onnx/backend/test/case/node/compress.pyexport_compress_0   s    $zCompress.export_compress_0c                  C  s|   t jjdddgdgdd} tddgdd	gd
dggtj}tddg}tj||dd}t| ||t	g|gdd d S )Nr   r   r	   r
   r   r   r   r   r   r   r   r   r   Ztest_compress_1r   r   r   r!   r!   r"   export_compress_1$   s    $zCompress.export_compress_1c                  C  s|   t jjdddgdgd} tddgdd	gd
dggtj}tdddddg}t||}t| ||t	g|gdd d S )Nr   r   r	   r
   )r   r   r   r   r   r   r   r   r   Ztest_compress_default_axisr   r   r   r!   r!   r"   export_compress_default_axis;   s    $z%Compress.export_compress_default_axisc                  C  s|   t jjdddgdgdd} tddgd	d
gddggtj}tddg}tj||dd}t| ||t	g|gdd d S )Nr   r   r	   r
   r   r   r   r   r   r   r   r   r   Ztest_compress_negative_axisr   r   r   r!   r!   r"   export_compress_negative_axisO   s    $z&Compress.export_compress_negative_axisN)__name__
__module____qualname__staticmethodr#   r$   r%   r'   r!   r!   r!   r"   r      s   r   )

__future__r   Znumpyr   r   Zonnx.backend.test.case.baser   Zonnx.backend.test.case.noder   r   r!   r!   r!   r"   <module>   s
   