
    bIgk                    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                      e Zd Zedd       Zedd       Zedd       Zedd       Zedd       Zedd       Z	edd       Z
edd       Zedd	       Zedd
       Zedd       Zedd       Zedd       Zy)Modc                 p   t         j                  j                  dddgdgd      } t        j                  g d      j                  t        j                        }t        j                  g d      j                  t        j                        }t        j                  ||      }t        | ||g|gd	
       y )Nr   xyz   inputsoutputsfmodg333333g@      @g333333@g       @g @g333333r   g g333333@r   test_mod_mixed_sign_float64r   r   name)	onnxhelper	make_nodenparrayastypefloat64r   r   noder	   r
   r   s       \/var/www/html/answerous/venv/lib/python3.12/site-packages/onnx/backend/test/case/node/mod.pyexport_mod_mixed_sign_float64z!Mod.export_mod_mixed_sign_float64   s    {{$$UC:uST$UHH56==bjjIHH56==bjjIGGAqMtQFQC6ST    c                 p   t         j                  j                  dddgdgd      } t        j                  g d      j                  t        j                        }t        j                  g d      j                  t        j                        }t        j                  ||      }t        | ||g|gd	
       y )Nr   r	   r
   r   r   r   r   r   test_mod_mixed_sign_float32r   )	r   r   r   r   r   r   float32r   r   r   s       r!   export_mod_mixed_sign_float32z!Mod.export_mod_mixed_sign_float32       {{$$UC:uST$UHH56==bjjIHH56==bjjIGGq
 	tQFQC6STr#   c                 p   t         j                  j                  dddgdgd      } t        j                  g d      j                  t        j                        }t        j                  g d      j                  t        j                        }t        j                  ||      }t        | ||g|gd	
       y )Nr   r	   r
   r   r   r   r   r   test_mod_mixed_sign_float16r   )	r   r   r   r   r   r   float16r   r   r   s       r!   export_mod_mixed_sign_float16z!Mod.export_mod_mixed_sign_float16"   r(   r#   c                 n   t         j                  j                  dddgdg      } t        j                  g d      j                  t        j                        }t        j                  g d      j                  t        j                        }t        j                  ||      }t        | ||g|gd	       y )
Nr   r	   r
   r   r   r            i      r4      r2   test_mod_mixed_sign_int64r   )	r   r   r   r   r   r   int64modr   r   s       r!   export_mod_mixed_sign_int64zMod.export_mod_mixed_sign_int64-       {{$$:E % 
 HH)*11"((;HH)*11"((;FF1aLtQFQC6QRr#   c                 n   t         j                  j                  dddgdg      } t        j                  g d      j                  t        j                        }t        j                  g d      j                  t        j                        }t        j                  ||      }t        | ||g|gd	       y )
Nr   r	   r
   r   r.   r/   r5   test_mod_mixed_sign_int32r   )	r   r   r   r   r   r   int32r<   r   r   s       r!   export_mod_mixed_sign_int32zMod.export_mod_mixed_sign_int32:   r>   r#   c                 n   t         j                  j                  dddgdg      } t        j                  g d      j                  t        j                        }t        j                  g d      j                  t        j                        }t        j                  ||      }t        | ||g|gd	       y )
Nr   r	   r
   r   r.   r/   r5   test_mod_mixed_sign_int16r   )	r   r   r   r   r   r   int16r<   r   r   s       r!   export_mod_mixed_sign_int16zMod.export_mod_mixed_sign_int16G   r>   r#   c                 n   t         j                  j                  dddgdg      } t        j                  g d      j                  t        j                        }t        j                  g d      j                  t        j                        }t        j                  ||      }t        | ||g|gd	       y )
Nr   r	   r
   r   r.   r/   r5   test_mod_mixed_sign_int8r   )	r   r   r   r   r   r   int8r<   r   r   s       r!   export_mod_mixed_sign_int8zMod.export_mod_mixed_sign_int8T   s    {{$$:E % 
 HH)*11"'':HH)*11"'':FF1aLtQFQC6PQr#   c                 n   t         j                  j                  dddgdg      } t        j                  g d      j                  t        j                        }t        j                  g d      j                  t        j                        }t        j                  ||      }t        | ||g|gd	       y )
Nr   r	   r
   r   r.   r3   r1   r2   r6   r9   r4   test_mod_uint8r   )	r   r   r   r   r   r   uint8r<   r   r   s       r!   export_mod_uint8zMod.export_mod_uint8a   s    {{$$:E % 
 HHY&&rxx0HHY&&rxx0FF1aLtQFQC6FGr#   c                 n   t         j                  j                  dddgdg      } t        j                  g d      j                  t        j                        }t        j                  g d      j                  t        j                        }t        j                  ||      }t        | ||g|gd	       y )
Nr   r	   r
   r   r.   rL   rM   test_mod_uint16r   )	r   r   r   r   r   r   uint16r<   r   r   s       r!   export_mod_uint16zMod.export_mod_uint16n       {{$$:E % 
 HHY&&ryy1HHY&&ryy1FF1aLtQFQC6GHr#   c                 n   t         j                  j                  dddgdg      } t        j                  g d      j                  t        j                        }t        j                  g d      j                  t        j                        }t        j                  ||      }t        | ||g|gd	       y )
Nr   r	   r
   r   r.   rL   rM   test_mod_uint32r   )	r   r   r   r   r   r   uint32r<   r   r   s       r!   export_mod_uint32zMod.export_mod_uint32{   rU   r#   c                 n   t         j                  j                  dddgdg      } t        j                  g d      j                  t        j                        }t        j                  g d      j                  t        j                        }t        j                  ||      }t        | ||g|gd	       y )
Nr   r	   r
   r   r.   rL   rM   test_mod_uint64r   )	r   r   r   r   r   r   uint64r<   r   r   s       r!   export_mod_uint64zMod.export_mod_uint64   rU   r#   c                 p   t         j                  j                  dddgdgd      } t        j                  g d      j                  t        j                        }t        j                  g d      j                  t        j                        }t        j                  ||      }t        | ||g|gd	
       y )Nr   r	   r
   r   r   r   r/   r5   test_mod_int64_fmodr   )	r   r   r   r   r   r   r;   r   r   r   s       r!   export_mod_int64_fmodzMod.export_mod_int64_fmod   s    {{$$UC:uST$UHH)*11"((;HH)*11"((;GGAqMtQFQC6KLr#   c                    t         j                  j                  dddgdg      } t        j                  dd      j                  g d      j                  t        j                        }t        j                  d	g      j                  t        j                        }t        j                  ||      }t        | ||g|gd
       y )Nr   r	   r
   r   r.   r      )r9   r6   r2   r1   test_mod_broadcastr   )r   r   r   r   arangereshaper   rA   r   r<   r   r   s       r!   export_mod_broadcastzMod.export_mod_broadcast   s    {{$$:E % 
 IIa$$Y/66rxx@HHaSM  *FF1aL 	tQFQC6JKr#   N)returnNone)__name__
__module____qualname__staticmethodr"   r'   r,   r=   rB   rF   rJ   rP   rT   rY   r]   r`   rf    r#   r!   r   r      s   U U U U U U 
S 
S 
S 
S 
S 
S 
R 
R 
H 
H 
I 
I 
I 
I 
I 
I M M L Lr#   r   )

__future__r   numpyr   r   onnx.backend.test.case.baser   onnx.backend.test.case.noder   r   rm   r#   r!   <module>rr      s&    #   , .dL$ dLr#   