bge*ddlmZddlmZmZmZmZmZmZm Z m Z m Z ddl m Z ddlZdFd ZdFd ZdFd ZdGdZdFdZdFdZdFdZdGdZdFdZdGdZdGdZdFdZdGdZdGdZdGdZdFdZdFdZ dFdZ!dFdZ"dGdZ#dGdZ$dFd Z%dFd!Z&dFd"Z'dGd#Z(dGd$Z)dGd%Z*dFd&Z+dFd'Z,dFd(Z-dFd)Z.dGd*Z/dGd+Z0dFd,Z1dFd-Z2dFd.Z3dFd/Z4dGd0Z5dGd1Z6dFd2Z7dGd3Z8dGd4Z9dGd5Z:dFd6Z;dGd7ZdFd:Z?dGd;Z@dFd<ZAdFd=ZBdFd>ZCdFd?ZDdFd@ZEdFdAZFdGdBZGdFdCZHdFdDZIdFdEZJdS)H) annotations) _boolean_dtypes_floating_dtypes_real_floating_dtypes_complex_floating_dtypes_integer_dtypes_integer_or_boolean_dtypes_real_numeric_dtypes_numeric_dtypes _result_type)ArrayNxrreturnc|jtvrtdtjt j|jS)zv Array API compatible wrapper for :py:func:`np.abs `. See its docstring for more information. z&Only numeric dtypes are allowed in abs)dtyper TypeErrorr_newnpabs_arrayrs y/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib64/python3.11/site-packages/numpy/array_api/_elementwise_functions.pyrrs<  wo%%@AAA :bfQX&& ' ''c|jtvrtdtjt j|jS)z| Array API compatible wrapper for :py:func:`np.arccos `. See its docstring for more information. z.Only floating-point dtypes are allowed in acos)rrrrrrarccosrrs racosr=  w&&&HIII :bi)) * **rc|jtvrtdtjt j|jS)z~ Array API compatible wrapper for :py:func:`np.arccosh `. See its docstring for more information. z/Only floating-point dtypes are allowed in acosh)rrrrrrarccoshrrs racoshr!+=  w&&&IJJJ :bj** + ++rx1x2c|jtvs|jtvrtdt|j|jt j||\}}t jtj|j |j S)zv Array API compatible wrapper for :py:func:`np.add `. See its docstring for more information. z&Only numeric dtypes are allowed in add) rr rr r_normalize_two_argsrraddrr#r$s rr'r'6sv  x&&"(/*I*I@AAA28$$$  &r2 . .FB :bfRY 22 3 33rc|jtvrtdtjt j|jS)z| Array API compatible wrapper for :py:func:`np.arcsin `. See its docstring for more information. z.Only floating-point dtypes are allowed in asin)rrrrrrarcsinrrs rasinr+Errc|jtvrtdtjt j|jS)z~ Array API compatible wrapper for :py:func:`np.arcsinh `. See its docstring for more information. z/Only floating-point dtypes are allowed in asinh)rrrrrrarcsinhrrs rasinhr.Qr"rc|jtvrtdtjt j|jS)z| Array API compatible wrapper for :py:func:`np.arctan `. See its docstring for more information. z.Only floating-point dtypes are allowed in atan)rrrrrrarctanrrs ratanr1]rrc|jtvs|jtvrtdt|j|jt j||\}}t jtj|j |j S)z~ Array API compatible wrapper for :py:func:`np.arctan2 `. See its docstring for more information. z4Only real floating-point dtypes are allowed in atan2) rrrr rr&rrarctan2rr(s ratan2r4isx  x,,,@U0U0UNOOO28$$$  &r2 . .FB :bjBI66 7 77rc|jtvrtdtjt j|jS)z~ Array API compatible wrapper for :py:func:`np.arctanh `. See its docstring for more information. z/Only floating-point dtypes are allowed in atanh)rrrrrrarctanhrrs ratanhr7xr"rc|jtvs|jtvrtdt|j|jt j||\}}t jtj|j |j S)z Array API compatible wrapper for :py:func:`np.bitwise_and `. See its docstring for more information. z9Only integer or boolean dtypes are allowed in bitwise_and) rr rr rr&rr bitwise_andrr(s rr9r9y 222 85 5 5STTT28$$$  &r2 . .FB :bnRY :: ; ;;rcv|jtvs|jtvrtdt|j|jt j||\}}t j|jdkrtdt j t j |j|jS)z Array API compatible wrapper for :py:func:`np.left_shift `. See its docstring for more information. z5Only integer dtypes are allowed in bitwise_left_shiftrz6bitwise_left_shift(x1, x2) is only defined for x2 >= 0) rr rr rr&ranyr ValueErrorr left_shiftr(s rbitwise_left_shiftr?s  x&&"(/*I*IOPPP28$$$  &r2 . .FB vbi!mSQRRR :bmBIry99 : ::rc|jtvrtdtjt j|jS)z| Array API compatible wrapper for :py:func:`np.invert `. See its docstring for more information. z`. See its docstring for more information. z8Only integer or boolean dtypes are allowed in bitwise_or) rr rr rr&rr bitwise_orrr(s rrDrDsy 222 85 5 5RSSS28$$$  &r2 . .FB :bmBIry99 : ::rcv|jtvs|jtvrtdt|j|jt j||\}}t j|jdkrtdt j t j |j|jS)z Array API compatible wrapper for :py:func:`np.right_shift `. See its docstring for more information. z6Only integer dtypes are allowed in bitwise_right_shiftrz7bitwise_right_shift(x1, x2) is only defined for x2 >= 0) rr rr rr&rr<rr=r right_shiftr(s rbitwise_right_shiftrGs  x&&"(/*I*IPQQQ28$$$  &r2 . .FB vbi!mTRSSS :bnRY :: ; ;;rc|jtvs|jtvrtdt|j|jt j||\}}t jtj|j |j S)z Array API compatible wrapper for :py:func:`np.bitwise_xor `. See its docstring for more information. z9Only integer or boolean dtypes are allowed in bitwise_xor) rr rr rr&rr bitwise_xorrr(s rrIrIr:rc|jtvrtd|jtvr|St jt j|jS)zx Array API compatible wrapper for :py:func:`np.ceil `. See its docstring for more information. z,Only real numeric dtypes are allowed in ceil) rr rr rrrceilrrs rrKrKsO  w***FGGGw/!! :bgah'' ( ((rc|jtvrtdtjt j|S)zx Array API compatible wrapper for :py:func:`np.conj `. See its docstring for more information. z6Only complex floating-point dtypes are allowed in conj)rrrrrrconjrs rrMrM9  w...PQQQ :bgajj ! !!rc|jtvrtdtjt j|jS)zv Array API compatible wrapper for :py:func:`np.cos `. See its docstring for more information. z-Only floating-point dtypes are allowed in cos)rrrrrrcosrrs rrPrP=  w&&&GHHH :bfQX&& ' ''rc|jtvrtdtjt j|jS)zx Array API compatible wrapper for :py:func:`np.cosh `. See its docstring for more information. z.Only floating-point dtypes are allowed in cosh)rrrrrrcoshrrs rrSrS =  w&&&HIII :bgah'' ( ((rc|jtvs|jtvrtdt|j|jt j||\}}t jtj|j |j S)z| Array API compatible wrapper for :py:func:`np.divide `. See its docstring for more information. z0Only floating-point dtypes are allowed in divide) rrrr rr&rrdividerr(s rrVrVsx  x'''28;K+K+KJKKK28$$$  &r2 . .FB :bi 2955 6 66rct|j|jtj||\}}tjt j|j|jS)zz Array API compatible wrapper for :py:func:`np.equal `. See its docstring for more information. )r rrr&rrequalrr(s rrXrX#sN28$$$  &r2 . .FB :bhry")44 5 55rc|jtvrtdtjt j|jS)zv Array API compatible wrapper for :py:func:`np.exp `. See its docstring for more information. z-Only floating-point dtypes are allowed in exp)rrrrrrexprrs rrZrZ/rQrc|jtvrtdtjt j|jS)zz Array API compatible wrapper for :py:func:`np.expm1 `. See its docstring for more information. z/Only floating-point dtypes are allowed in expm1)rrrrrrexpm1rrs rr\r\:=  w&&&IJJJ :bhqx(( ) ))rc|jtvrtd|jtvr|St jt j|jS)zz Array API compatible wrapper for :py:func:`np.floor `. See its docstring for more information. z-Only real numeric dtypes are allowed in floor) rr rr rrrfloorrrs rr_r_EO  w***GHHHw/!! :bhqx(( ) ))rc|jtvs|jtvrtdt|j|jt j||\}}t jtj|j |j S)z Array API compatible wrapper for :py:func:`np.floor_divide `. See its docstring for more information. z4Only real numeric dtypes are allowed in floor_divide) rr rr rr&rr floor_dividerr(s rrbrbSsx  x+++rx?S/S/SNOOO28$$$  &r2 . .FB :bobi;; < <`. See its docstring for more information. z/Only real numeric dtypes are allowed in greater) rr rr rr&rrgreaterrr(s rrdrdasx  x+++rx?S/S/SIJJJ28$$$  &r2 . .FB :bjBI66 7 77rc|jtvs|jtvrtdt|j|jt j||\}}t jtj|j |j S)z Array API compatible wrapper for :py:func:`np.greater_equal `. See its docstring for more information. z5Only real numeric dtypes are allowed in greater_equal) rr rr rr&rr greater_equalrr(s rrfrfosy  x+++rx?S/S/SOPPP28$$$  &r2 . .FB :b&ry")<< = ==rc|jtvrtdtjt j|S)zx Array API compatible wrapper for :py:func:`np.imag `. See its docstring for more information. z6Only complex floating-point dtypes are allowed in imag)rrrrrrimagrs rrhrh}rNrc|jtvrtdtjt j|jS)z Array API compatible wrapper for :py:func:`np.isfinite `. See its docstring for more information. z+Only numeric dtypes are allowed in isfinite)rr rrrrisfiniterrs rrjrj<  wo%%EFFF :bk!(++ , ,,rc|jtvrtdtjt j|jS)zz Array API compatible wrapper for :py:func:`np.isinf `. See its docstring for more information. z(Only numeric dtypes are allowed in isinf)rr rrrrisinfrrs rrmrm<  wo%%BCCC :bhqx(( ) ))rc|jtvrtdtjt j|jS)zz Array API compatible wrapper for :py:func:`np.isnan `. See its docstring for more information. z(Only numeric dtypes are allowed in isnan)rr rrrrisnanrrs rrprprnrc|jtvs|jtvrtdt|j|jt j||\}}t jtj|j |j S)zx Array API compatible wrapper for :py:func:`np.less `. See its docstring for more information. z,Only real numeric dtypes are allowed in less) rr rr rr&rrlessrr(s rrrrrsx  x+++rx?S/S/SFGGG28$$$  &r2 . .FB :bgbi33 4 44rc|jtvs|jtvrtdt|j|jt j||\}}t jtj|j |j S)z Array API compatible wrapper for :py:func:`np.less_equal `. See its docstring for more information. z2Only real numeric dtypes are allowed in less_equal) rr rr rr&rr less_equalrr(s rrtrtsx  x+++rx?S/S/SLMMM28$$$  &r2 . .FB :bmBIry99 : ::rc|jtvrtdtjt j|jS)zv Array API compatible wrapper for :py:func:`np.log `. See its docstring for more information. z-Only floating-point dtypes are allowed in log)rrrrrrlogrrs rrvrvrQrc|jtvrtdtjt j|jS)zz Array API compatible wrapper for :py:func:`np.log1p `. See its docstring for more information. z/Only floating-point dtypes are allowed in log1p)rrrrrrlog1prrs rrxrxr]rc|jtvrtdtjt j|jS)zx Array API compatible wrapper for :py:func:`np.log2 `. See its docstring for more information. z.Only floating-point dtypes are allowed in log2)rrrrrrlog2rrs rrzrzrTrc|jtvrtdtjt j|jS)zz Array API compatible wrapper for :py:func:`np.log10 `. See its docstring for more information. z/Only floating-point dtypes are allowed in log10)rrrrrrlog10rrs rr|r|r]rc|jtvs|jtvrtdt|j|jt j||\}}t jtj|j |j S)z Array API compatible wrapper for :py:func:`np.logaddexp `. See its docstring for more information. z8Only real floating-point dtypes are allowed in logaddexp) rrrr rr&rr logaddexprr(s rr~r~sx  x,,,@U0U0URSSS28$$$  &r2 . .FB :bl29bi88 9 99rc|jtvs|jtvrtdt|j|jt j||\}}t jtj|j |j S)z Array API compatible wrapper for :py:func:`np.logical_and `. See its docstring for more information. z.Only boolean dtypes are allowed in logical_and) rrrr rr&rr logical_andrr(s rrrv  x&&"(/*I*IHIII28$$$  &r2 . .FB :bnRY :: ; ;;rc|jtvrtdtjt j|jS)z Array API compatible wrapper for :py:func:`np.logical_not `. See its docstring for more information. z.Only boolean dtypes are allowed in logical_not)rrrrrr logical_notrrs rrr s<  wo%%HIII :bnQX.. / //rc|jtvs|jtvrtdt|j|jt j||\}}t jtj|j |j S)z Array API compatible wrapper for :py:func:`np.logical_or `. See its docstring for more information. z-Only boolean dtypes are allowed in logical_or) rrrr rr&rr logical_orrr(s rrrsv  x&&"(/*I*IGHHH28$$$  &r2 . .FB :bmBIry99 : ::rc|jtvs|jtvrtdt|j|jt j||\}}t jtj|j |j S)z Array API compatible wrapper for :py:func:`np.logical_xor `. See its docstring for more information. z.Only boolean dtypes are allowed in logical_xor) rrrr rr&rr logical_xorrr(s rrr&rrc|jtvs|jtvrtdt|j|jt j||\}}t jtj|j |j S)z Array API compatible wrapper for :py:func:`np.multiply `. See its docstring for more information. z+Only numeric dtypes are allowed in multiply) rr rr rr&rrmultiplyrr(s rrr4v  x&&"(/*I*IEFFF28$$$  &r2 . .FB :bk")RY77 8 88rc|jtvrtdtjt j|jS)z Array API compatible wrapper for :py:func:`np.negative `. See its docstring for more information. z+Only numeric dtypes are allowed in negative)rr rrrrnegativerrs rrrBrkrct|j|jtj||\}}tjt j|j|jS)z Array API compatible wrapper for :py:func:`np.not_equal `. See its docstring for more information. )r rrr&rr not_equalrr(s rrrMsN28$$$  &r2 . .FB :bl29bi88 9 99rc|jtvrtdtjt j|jS)z Array API compatible wrapper for :py:func:`np.positive `. See its docstring for more information. z+Only numeric dtypes are allowed in positive)rr rrrrpositiverrs rrrYrkrc|jtvs|jtvrtdt|j|jt j||\}}t jtj|j |j S)zz Array API compatible wrapper for :py:func:`np.power `. See its docstring for more information. z&Only numeric dtypes are allowed in pow) rr rr rr&rrpowerrr(s rpowresv  x&&"(/*I*I@AAA28$$$  &r2 . .FB :bhry")44 5 55rc|jtvrtdtjt j|S)zx Array API compatible wrapper for :py:func:`np.real `. See its docstring for more information. z6Only complex floating-point dtypes are allowed in real)rrrrrrrealrs rrrsrNrc|jtvs|jtvrtdt|j|jt j||\}}t jtj|j |j S)z Array API compatible wrapper for :py:func:`np.remainder `. See its docstring for more information. z1Only real numeric dtypes are allowed in remainder) rr rr rr&rr remainderrr(s rrr~sx  x+++rx?S/S/SKLLL28$$$  &r2 . .FB :bl29bi88 9 99rc|jtvrtdtjt j|jS)zz Array API compatible wrapper for :py:func:`np.round `. See its docstring for more information. z(Only numeric dtypes are allowed in round)rr rrrrroundrrs rrrrnrc|jtvrtdtjt j|jS)zx Array API compatible wrapper for :py:func:`np.sign `. See its docstring for more information. z'Only numeric dtypes are allowed in sign)rr rrrrsignrrs rrrs<  wo%%ABBB :bgah'' ( ((rc|jtvrtdtjt j|jS)zv Array API compatible wrapper for :py:func:`np.sin `. See its docstring for more information. z-Only floating-point dtypes are allowed in sin)rrrrrrsinrrs rrrrQrc|jtvrtdtjt j|jS)zx Array API compatible wrapper for :py:func:`np.sinh `. See its docstring for more information. z.Only floating-point dtypes are allowed in sinh)rrrrrrsinhrrs rrrrTrc|jtvrtdtjt j|jS)z| Array API compatible wrapper for :py:func:`np.square `. See its docstring for more information. z)Only numeric dtypes are allowed in square)rr rrrrsquarerrs rrrs<  wo%%CDDD :bi)) * **rc|jtvrtdtjt j|jS)zx Array API compatible wrapper for :py:func:`np.sqrt `. See its docstring for more information. z.Only floating-point dtypes are allowed in sqrt)rrrrrrsqrtrrs rrrrTrc|jtvs|jtvrtdt|j|jt j||\}}t jtj|j |j S)z Array API compatible wrapper for :py:func:`np.subtract `. See its docstring for more information. z+Only numeric dtypes are allowed in subtract) rr rr rr&rrsubtractrr(s rrrrrc|jtvrtdtjt j|jS)zv Array API compatible wrapper for :py:func:`np.tan `. See its docstring for more information. z-Only floating-point dtypes are allowed in tan)rrrrrrtanrrs rrrrQrc|jtvrtdtjt j|jS)zx Array API compatible wrapper for :py:func:`np.tanh `. See its docstring for more information. z.Only floating-point dtypes are allowed in tanh)rrrrrrtanhrrs rrrrTrc|jtvrtd|jtvr|St jt j|jS)zz Array API compatible wrapper for :py:func:`np.trunc `. See its docstring for more information. z-Only real numeric dtypes are allowed in trunc) rr rr rrrtruncrrs rrrr`r)rrrr)r#rr$rrr)K __future__r_dtypesrrrrr r r r r _array_objectrnumpyrrrr!r'r+r.r1r4r7r9r?rBrDrGrIrKrMrPrSrVrXrZr\r_rbrdrfrhrjrmrprrrtrvrxrzr|r~rrrrrrrrrrrrrrrrrrrrrrrrsK""""""                      ! ((((++++,,,, 4 4 4 4++++,,,,++++ 8 8 8 8,,,,<<<<$;;;;$++++;;;;$<<<<"<<<<" ) ) ) )""""(((()))) 7 7 7 7 6 6 6 6((((**** * * * * = = = = 8 8 8 8 > > > >""""----******** 5 5 5 5 ; ; ; ;((((****))))**** : : : : < < < <0000 ; ; ; ; < < < < 9 9 9 9---- : : : :---- 6 6 6 6"""" : : : :****))))(((())))++++)))) 9 9 9 9(((()))) * * * * * *r