o
    soik                     @  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                   @  s`   e Zd ZedddZedddZedddZedd	d
ZedddZedddZ	dS )	ReduceMinreturnNonec               	   C  s  g d} t jdgt jd}d}tjjdddgdg|d	}t jd
dgddggddgddggddgddgggt jd}t jj|t	||dkd}t
|||g|gdtjddgd t jd t jdd| t j}t jj|t	||dkd}t
|||g|gdtjddgd d S )N      r
      dtyper   r   dataaxesreducedinputsoutputskeepdims      r
      (   7   <   axisr   'test_reduce_min_do_not_keepdims_example    r   r   nameopset_imports
   &test_reduce_min_do_not_keepdims_randomnparrayint64onnxhelper	make_nodefloat32minimumreducetupler   make_opsetidrandomseeduniformastypeshaper   r   noder   r    r9   Y/home/ubuntu/.local/lib/python3.10/site-packages/onnx/backend/test/case/node/reducemin.pyexport_do_not_keepdims   >   ,
z ReduceMin.export_do_not_keepdimsc               	   C  s  g d} t jdgt jd}d}tjjdddgdg|d}t jd	dgd
dggddgddggddgddgggt jd}t jj|t	||dkd}t
|||g|gdtjddgd t jd t jdd| t j}t jj|t	||dkd}t
|||g|gdtjddgd d S )Nr   r   r   r   r   r   r   r   r   r   r
   r   r   r   r   r    test_reduce_min_keepdims_exampler   r   r    r   r#   r$   test_reduce_min_keepdims_randomr&   r6   r9   r9   r:   export_keepdims9   r<   zReduceMin.export_keepdimsc               	   C  s   g d} d }d}t jjddgdg|d}tjddgdd	ggd
dgdd	ggddgdd	gggtjd}tjj|||dkd}t||g|gdt j	ddgd tj
d tj
dd| tj}tjj|||dkd}t||g|gdt j	ddgd d S )Nr   r   r   r   r   r   r   r   r
   r   r   r   r   r   r   -test_reduce_min_default_axes_keepdims_exampler   r   r    r   r#   r$   ,test_reduce_min_default_axes_keepdims_random)r*   r+   r,   r'   r(   r-   r.   r/   r   r1   r2   r3   r4   r5   r6   r9   r9   r:   export_default_axes_keepdimsd   s8   ,
z&ReduceMin.export_default_axes_keepdimsc               	   C  s  g d} t jdgt jd}d}tjjdddgdg|d	}t jd
dgddggddgddggddgddgggt jd}t jj|t	||dkd}t
|||g|gdtjddgd t jd t jdd| t j}t jj|t	||dkd}t
|||g|gdtjddgd d S )Nr   r   r   r   r   r   r   r   r   r   r
   r   r   r   r   r   .test_reduce_min_negative_axes_keepdims_exampler   r   r    r   r#   r$   -test_reduce_min_negative_axes_keepdims_randomr&   r6   r9   r9   r:   export_negative_axes_keepdims   r<   z'ReduceMin.export_negative_axes_keepdimsc                  C  s   t jdgt jd} d}tjjdddgdg|d}t ddgdd	gd	dgd	d	gg}t jj|t| t	|d
}t
||| g|gdd d S )Nr   r   r   r   r   r   r   TFr   test_reduce_min_bool_inputsr   r   r!   )r'   r(   r)   r*   r+   r,   r.   r/   r0   boolr   )r   r   r8   r   r   r9   r9   r:   export_bool_inputs   s$   
zReduceMin.export_bool_inputsc            	      C  s   g d} d}g d}t jjdddgdg|d}tjg tjd	| }tjdgtjd	}ttj|tjd	}ttj	|tjd	}|| }t
|||g|gd
d d S )N)r
   r      r   )r
   r   rK   r   r   r   r   r   r   test_reduce_min_empty_setrH   )r*   r+   r,   r'   r(   r-   reshaper)   oneszerosr   )	r7   r   reduced_shaper8   r   r   onezeror   r9   r9   r:   export_empty_set   s(   
zReduceMin.export_empty_setN)r   r   )
__name__
__module____qualname__staticmethodr;   r?   rB   rF   rJ   rS   r9   r9   r9   r:   r      s    **%*r   )

__future__r   numpyr'   r*   onnx.backend.test.case.baser   onnx.backend.test.case.noder   r   r9   r9   r9   r:   <module>   s   