
    bIg                    N    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e      Z	y)    )annotationsN)Base)expectc                  f    e Zd Zedd       Zedd       Zedd       Zedd       Zedd       Zy)ReduceL1c                 &   g d} t        j                  dgt         j                        }d}t        j                  j                  dddgdg|	      }t        j                  t        j                  d
t        j                  |       d
z   t         j                        |       }t        j                  t        j                  |      t        |      |d
k(        }t        |||g|gd       t         j                  j                  d       t         j                  j!                  dd|       j#                  t         j                        }t        j                  t        j                  |      t        |      |d
k(        }t        |||g|gd       y )N      r   r   dtyper   r   dataaxesreducedinputsoutputskeepdims   aaxisr   &test_reduce_l1_do_not_keepdims_exampler   r   name
   %test_reduce_l1_do_not_keepdims_randomnparrayint64onnxhelper	make_nodereshapearangeprodfloat32sumabstupler   randomseeduniformastypeshaper   r   noder   r   s         a/var/www/html/answerous/venv/lib/python3.12/site-packages/onnx/backend/test/case/node/reducel1.pyexport_do_not_keepdimszReduceL1.export_do_not_keepdims   s5   xx288,{{$$F#K	 % 
 zz"))Arwwu~'9LeT &&266$<eDkHPQMR 	$<I9		
 			qyy  b%077

C&&266$<eDkHPQMR$<I8		
    c                 &   g d} t        j                  dgt         j                        }d}t        j                  j                  dddgdg|	      }t        j                  t        j                  dt        j                  |       dz   t         j                        |       }t        j                  t        j                  |      t        |      |dk(  
      }t        |||g|gd       t         j                  j                  d       t         j                  j!                  dd|       j#                  t         j                        }t        j                  t        j                  |      t        |      |dk(  
      }t        |||g|gd       y )Nr	   r   r   r   r   r   r   r   r   r    test_reduce_l1_keep_dims_exampler   r   r   r   test_reduce_l1_keep_dims_randomr   r1   s         r4   export_keepdimszReduceL1.export_keepdims5   s5   xx288,{{$$F#K	 % 
 zz"))Arwwu~'9LeT &&266$<eDkHPQMR 	$<I3		
 			qyy  b%077

C&&266$<eDkHPQMR$<I2		
r6   c                     g d} t        j                  g t         j                        }d}t        j                  j                  dddgdg|      }t        j                  t        j                  dt        j                  |       dz   t         j                        |       }t        j                  t        j                  |      d |dk(  	      }t        |||g|gd
       t         j                  j                  d       t         j                  j                  dd|       j!                  t         j                        }t        j                  t        j                  |      d |dk(  	      }t        |||g|gd       y )Nr	   r   r   r   r   r   r   r   r   ,test_reduce_l1_default_axes_keepdims_exampler   r   r   r   +test_reduce_l1_default_axes_keepdims_random)r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r   r-   r.   r/   r0   r1   s         r4   export_default_axes_keepdimsz%ReduceL1.export_default_axes_keepdims\   s&   xx"((+{{$$/)x % 
 zz"))Arwwu~'9LeT &&266$<dX]K 	$<I?		
 			qyy  b%077

C&&266$<dX]K$<I>		
r6   c                 &   g d} t        j                  dgt         j                        }d}t        j                  j                  dddgdg|	      }t        j                  t        j                  dt        j                  |       dz   t         j                        |       }t        j                  t        j                  |      t        |      |dk(  
      }t        |||g|gd       t         j                  j                  d       t         j                  j!                  dd|       j#                  t         j                        }t        j                  t        j                  |      t        |      |dk(  
      }t        |||g|gd       y )Nr	   r   r   r   r   r   r   r   r   .test_reduce_l1_negative_axes_keep_dims_exampler   r   r   r   -test_reduce_l1_negative_axes_keep_dims_randomr   r1   s         r4   export_negative_axes_keepdimsz&ReduceL1.export_negative_axes_keepdims   s5   xxBHH-{{$$F#K	 % 
 zz"))Arwwu~'9LeT &&266$<eDkHPQMR 	$<IA		
 			qyy  b%077

C&&266$<eDkHPQMR$<I@		
r6   c                    g d} d}g d}t         j                  j                  dddgdg|      }t        j                  g t        j
                  	      j                  |       }t        j                  dgt        j                  	      }t        j                  t        j                  |t        j
                  	            }t        |||g|gd
       y )N)r   r      r   )r   r   rE   r   r   r   r   r   r   test_reduce_l1_empty_setr   )
r#   r$   r%   r    r!   r)   r&   r"   zerosr   )r2   r   reduced_shaper3   r   r   r   s          r4   export_empty_setzReduceL1.export_empty_set   s    !{{$$F#K	 % 
 xx"**-55e<xx288,((288MDE$<I+		
r6   N)returnNone)	__name__
__module____qualname__staticmethodr5   r:   r>   rC   rI    r6   r4   r   r      sh    $
 $
L $
 $
L !
 !
F $
 $
L 
 
r6   r   )

__future__r   numpyr    r#   onnx.backend.test.case.baser   onnx.backend.test.case.noder   r   rP   r6   r4   <module>rU      s$    #   , .p
t p
r6   