o
    wi
                     @  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                   @  sD   e Zd ZedddZedddZedddZedd	d
ZdS )CompressreturnNonec                  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g d}tj||dd}t| ||t	g|gdd d S )Nr   input	conditionoutputr   inputsoutputsaxis                  )r   r   r   r   test_compress_0r   r   name
onnxhelper	make_nodenparrayastypefloat32compressr   boolnoder   r	   r
    r%   a/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/onnx/backend/test/case/node/compress.pyexport_compress_0      $
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   test_compress_1r   r   r#   r%   r%   r&   export_compress_1$   s   $
zCompress.export_compress_1c                  C  sv   t jjdddgdgd} tddgdd	gd
dggtj}tg d}t||}t| ||t	g|gdd d S )Nr   r   r	   r
   )r   r   r   r   r   r   r   r   )r   r   r   r   r   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   test_compress_negative_axisr   r   r#   r%   r%   r&   export_compress_negative_axisO   r(   z&Compress.export_compress_negative_axisN)r   r   )__name__
__module____qualname__staticmethodr'   r*   r,   r/   r%   r%   r%   r&   r      s    r   )

__future__r   numpyr   r   onnx.backend.test.case.baser   onnx.backend.test.case.noder   r   r%   r%   r%   r&   <module>   s   