+
    iG                        ^ RI Ht ^ RIHt ^ RIHt ^ RIHtHt ^ RI	H
t
 ^ RIHt ^ RIHtHtHtHtHtHtHtHtHtHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHtH t H!t!H"t"H#t#H$t$H%t%H&t&H't'H(t(H)t)H*t*H+t+H,t,H-t-H.t.H/t/H0t0H1t1H2t2H3t3H4t4H5t5H6t6 ^ RI7H8t8 ^ RI9H:t:H;t; ^ RI<H=t=H>t>H?t? ^ RI@HAtA ^ RIBHCtCHDtDHEtEHFtFHGtG ^ RIHHItI ^ RIJHKtKHLtL ^ RIMHNtNHOtO ^ RIPHQtQHRtR ^ RISHTtTHUtUHVtVHWtWHXtX ^ RIYHZtZ ^ RI[H\t\ ]! R4      w  t]t^t_]Q! R4      t`R taR tbR tcR tdR teR tfR  tgR! thR" tiR# tjR$ tk ! R% R&]4      tlR' tmR( tnR) toR* tpR+ tqR, trR- tsR. ttR/ tuR0 tvR1 twR2 txR3 tyR4# )5    )Not)
Assignment)none)expm1log1p)cosm1)MatrixSolve)
ExprModsymbolsEqLeGtzooooRationalPow)
Derivative)pi)S)acosKroneckerDelta	PiecewisesignsqrtMinMaxcotacschaseccothseclogsincostanasinatansinhcoshtanhasinhacoshatanh)atan2)AndOr)SparseMatrixMatrixSymbolIdentity)PrintMethodNotImplementedError)MpmathPrinterCmathPrinterPythonCodePrinterpycodeSymPyPrinter)TensorflowPrinter)NumPyPrinterSciPyPrinter)raisesskip)IndexedBaseIdx)ArraySymbolArrayDiagonalArrayContraction	ZeroArrayOneArray)import_module)loggammazx y zpc            
         \        4       p V P                  '       d   Q hV P                  \        \        ,          4      R 8X  g   Q hV P                  \        \        ^4      4      R8X  g   Q hV P                  \        \        \        4      ) 4      R8X  g   Q hV P                  \        \        ) \        4      4      R8X  g   Q hV P                  \        \        \        4      4      R8X  g   Q hV P                  \        \        \        4      4      R8X  g   Q hV P                  ^\        \        ,           ,          4      R8X  g   Q hV P                  \        \        4      4      R8X  g   Q hV P                  '       d   Q hV P                  \        4      R8X  g   Q hV P                  R	R
0/8X  g   Q hV P                  \        \        ^^4      ,          4      R8X  g   Q hV P                  \        \        4      4      R8X  g   Q hV P                  R	R
R0/8X  g   Q hV P                  \        \        4      4      R8X  g   Q hV P                  \        \        4      4      R8X  g   Q hV P                  \        \        4      4      R8X  g   Q hV P                  \        \        4      4      R8X  g   Q hV P                  \!        \        4      4      R8X  g   Q hV P                  \#        \        ^4      4      R8X  g   Q hV P                  \%        ^\'        \        ^ 4      3^\        ^8  34      4      R8X  g   Q hV P                  \%        ^\)        \        ^ 4      3^\+        \        ^ 4      3RR7      4      R8X  g   Q hV P                  \-        \        4      4      R8X  g   Q hV P                  \.        R,          4      R8X  g   Q hV P                  \1        \        \        4      4      R8X  g   Q hV P                  R 4      R8X  g   Q hV P                  ^^.4      R8X  g   Q hV P                  \3        \        \        4      4      R8X  g   Q hV P                  \5        \        \        4      4      R8X  g   Q hR# )!zx**yzx % 2z-(x % y)z(-x) % yzx and yzx or yz	1/(x + y)znot xzmath.pimathr   math.sqrt(x)r   zmath.acos(x)z(1/math.tan(x))z;((math.exp(x) + math.exp(-x))/(math.exp(x) - math.exp(-x)))z(math.acos(1/x))z((math.log(math.sqrt(1 + x**(-2)) + 1/x))zx = 2z/((1) if (x == 0) else (2) if (x > 6) else None)Fevaluatez/((2) if (x <= 0) else (3) if (x > 0) else None)z((0.0 if x == 0 else math.copysign(1, x))zp[0, 1]z(1 if x == y else 0)z(2, 3)z[2, 3]z	min(x, y)z	max(x, y)Nr            )r8   module_importsdoprintxyr   r0   r1   r   r   r   r   r   r   r!   r    r   r   r   r   r   r   r   rI   r   r   r   prntrs    ^/var/www/html/photoedit/myenv/lib/python3.14/site-packages/sympy/printing/tests/test_pycode.pytest_PythonCodePrinterr[   !   s   E#####==A&(((==Q#w...==#a)$
222==aR$
222==Q#y000==Aq"h...==AaC![000==Q G+++#####==	)))FTF#3333==HQN*+~=====a!^333FT6N#;;;;==a!^333==Q $5555==a!%bbbb==a!%7777==q"&PPPP==Aq)*g555==Ar!Qx=AaC" #&WX X X==Ar!Qx=Bq!H7 8<UU U U ==a!%OOOO==4!Y...==!,-1GGGG==8+++==!A8+++==Q#{222==Q#{222    c                  b    \        4       p V P                  R 8X  g   Q h\        \        R 4       R# )python3c                      \        R R/4      # )standardpython4)r8    r\   rZ   <lambda>1test_PythonCodePrinter_standard.<locals>.<lambda>S   s    0*Y1GHr\   N)r8   r`   r>   
ValueErrorrX   s    rZ   test_PythonCodePrinter_standardrf   N   s'    E>>Y&&&
:HIr\   c                  &   \        4       p V P                  \        \        4      4      R 8X  g   Q hV P                  \	        \        4      4      R8X  g   Q hV P                  \        \        4      4      R8X  g   Q hV P                  \        \        4      4      R8X  g   Q hV P                  \        \        4      4      R8X  g   Q hV P                  \        \        4      4      R8X  g   Q hV P                  \        \        4      4      R8X  g   Q hV P                  \        \        4      4      R8X  g   Q hV P                  \        \        4      4      R8X  g   Q hV P                  \        \        4      4      R	8X  g   Q hV P                  \        \        4      4      R
8X  g   Q hV P                  \        \        4      4      R8X  g   Q hV P                  \        \        4      4      R8X  g   Q hV P                  \!        \        4      4      R8X  g   Q hR# )zcmath.sqrt(x)zcmath.log(x)zcmath.sin(x)zcmath.cos(x)zcmath.tan(x)zcmath.asin(x)zcmath.acos(x)zcmath.atan(x)zcmath.sinh(x)zcmath.cosh(x)zcmath.tanh(x)zcmath.asinh(x)zcmath.acosh(x)zcmath.atanh(x)N)r7   rU   r   rV   r#   r$   r%   r&   r'   r   r(   r)   r*   r+   r,   r-   r.   rI   s    rZ   test_CmathPrinterri   V   s   A99T!W00099SV...99SV...99SV...99SV...99T!W00099T!W00099T!W00099T!W00099T!W00099T!W00099U1X"222299U1X"222299U1X"2222r\   c                     \        4       p V P                  \        \        4      4      R 8X  g   Q hV P                  \	        ^^4      4      R8X  g   Q hV P                  \
        P                  4      R8X  g   Q hV P                  \
        P                  4      R8X  g   Q hV P                  \
        P                  4      R8X  g   Q hV P                  \
        P                  4      R8X  g   Q hV P                  \
        P                  4      R8X  g   Q hV P                  \
        P                  4      R8X  g   Q hV P                  \
        P                  4      R8X  g   Q hV P                  \        \        4      4      R	8X  g   Q hR
# )zmpmath.sign(x)zmpmath.mpf(1)/mpmath.mpf(2)zmpmath.ez	mpmath.piz
mpmath.phizmpmath.eulerz
mpmath.nanz
mpmath.infzmpmath.ninfzmpmath.loggamma(x)N)r6   rU   r   rV   r   r   Exp1PiGoldenRatio
EulerGammaNaNInfinityNegativeInfinityrH   rh   s    rZ   test_MpmathPrinterrr   m   s   A99T!W!111199Xa^$(EEEE99QVV
***99QTT?k)))99Q]]#|33399Q\\"n44499QUU|+++99QZZ L00099Q''(M99999Xa[!%9999r\   c                     ^ RI Hp  ^ RIHp ^ RIHpHpHp ^ RIH	p ^ RI
Hp ^ RIHp ^ RIHpHp	 ^ RIHp
Hp \)        4       pVP+                  \-        \.        4      4      R	8X  g   Q h\1        R
^^4      p\1        R^^4      p\1        R^^4      p\1        R^^4      pVP+                  VR+,          4      R8X  g   Q hVP+                  V^,          4      R8X  g   Q hVP+                  \3        ^4      4      R8X  g   Q h\1        R^^4      p\1        R^^4      pVP+                  \5        VV4      4      R8X  g   Q hVP+                  \5        VV4      V,           4      R8X  g   Q hVP+                  V	! ^^4      4      R8X  g   Q hVP+                  V! ^^4      4      R8X  g   Q hVP+                  V! ^^V ! W3W,           4      4      4      R8X  g   Q hVP+                  V! W4      4      R8X  g   Q hVP+                  V! W4      4      R8X  g   Q hVP+                  V! V4      4      R8X  g   Q hVP+                  V! V4      4      R8X  g   Q hVP+                  V! V4      4      R8X  g   Q hVP+                  V! V4      4      R8X  g   Q hVP+                  \.        R+,          4      R8X  g   Q hVP+                  \.        R,,          4      R8X  g   Q h\7        ^R+R R!7      pVP+                  V4      R"8X  g   Q hVP+                  \8        P:                  4      R#8X  g   Q hVP+                  \8        P<                  4      R$8X  g   Q hVP+                  \8        P>                  4      R%8X  g   Q hVP+                  \8        P@                  4      R&8X  g   Q hVP+                  \8        PB                  4      R'8X  g   Q hVP+                  \8        PD                  4      R(8X  g   Q hVP+                  \G        \.        4      ^,          4      R)8X  g   Q hR*# )-r   )Lambda)Adjoint)
DiagMatrixDiagonalMatrix
DiagonalOf)FunctionMatrix)HadamardProduct)KroneckerProduct)	OneMatrix
ZeroMatrix)abznumpy.sign(x)ABCDznumpy.linalg.inv(A)znumpy.linalg.matrix_power(A, 5)znumpy.eye(3)rV   rW   znumpy.linalg.solve(A, x)znumpy.linalg.solve(A, x) + yznumpy.zeros((2, 3))znumpy.ones((2, 3))z.numpy.fromfunction(lambda a, b: a + b, (4, 5))znumpy.multiply(A, B)znumpy.kron(A, B)z#numpy.conjugate(numpy.transpose(A))z%numpy.reshape(numpy.diag(A), (-1, 1))znumpy.diagflat(C)z"numpy.multiply(D, numpy.eye(3, 4))z	x**(-1.0)z	x**(-2.0)FrM   z	2**(-1.0)numpy.eznumpy.piznumpy.euler_gammaz	numpy.nanz	numpy.infz
-numpy.infz(numpy.cos(x)**(-1.0))**2N)$sympy.core.functionrt   "sympy.matrices.expressions.adjointru   #sympy.matrices.expressions.diagonalrv   rw   rx   %sympy.matrices.expressions.funcmatrixry   #sympy.matrices.expressions.hadamardrz   $sympy.matrices.expressions.kroneckerr{   "sympy.matrices.expressions.specialr|   r}   	sympy.abcr~   r   r<   rU   r   rV   r3   r4   r	   r   r   rk   rl   rn   ro   rp   rq   r"   )rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   rI   r   r   r   r   uvexprs                       rZ   test_NumPyPrinterr   |   se   *:\\DCEJA99T!W000S!QAS!QAS!QAS!QA99QW!666699QT?????99Xa[!^333S!QAS!QA99[A&'+EEEE99[A&*+/MMMM99Z1%&*????99Yq!_%)====99^Aq&!*?@A89 9 999_Q*+/EEEE99%a+,0BBBB99WQZ $IIII99Z]#'NNNN99Z]#'::::99^A&'+OOOO 99QU{***99QU{***q"u%D99T?k)))99QVV	)))99QTT?j(((99Q\\"&999999QUU{***99QZZ K///99Q''(L888 99SVQY#>>>>r\   c                  R   \        R 4      p V '       g   \        R4       ^ RIHpHp ^ RIHp V! R\        ,          ^,           \        ^,           R\        ,          ^,           4      pV! \        VR 4      pV! V P                  ^ ^^4      4      . RO8H  P                  4       '       g   Q hV! ^4      ^8X  g   Q hV! \        ^,          \        ^,          4      pV! \        VR 4      pV! V P                  R^^4      4      . R	O8H  P                  4       '       g   Q hV! ^4      ^@8X  g   Q hR# )
numpyznumpy not installed.)r   r   )lambdifyg?g      ?N)g      ?g      ?g      @r   )rP   r   rP      )
rG   r?   (sympy.functions.elementary.miscellaneousr   r   sympy.utilities.lambdifyr   rV   linspaceall)r   r   r   r   expr1funcs         rZ   test_issue_18770r      s    '"E#$C1A	1q5#a%!),EAug&D1a()->>CCEEEEGqLL1adOEAeW%DAq)*l:@@BBBB7b==r\   c                     \        4       p \        \        4      pR V P                  9  g   Q hV P	                  V4      R8X  g   Q hR V P                  9   g   Q h\
        ;QJ d&    R V P                   4       F  '       g   K   RM	  RM! R V P                   4       4      '       d   Q h\        ^^R^/4      pV P	                  V4      R8X  g   Q hRV P                  9   g   Q hV P	                  \        P                  4      R8X  g   Q hV P	                  \        P                  4      R8X  g   Q hV P	                  \        P                  4      R	8X  g   Q hR
# )r   znumpy.arccos(x)c              3   B   "   T F  qP                  R 4      x  K  	  R# 5i)scipyN)
startswith).0ms   & rZ   	<genexpr>$test_SciPyPrinter.<locals>.<genexpr>   s     C2BQ<<((2Bs   TFz8scipy.sparse.coo_matrix(([3], ([0], [1])), shape=(2, 5))zscipy.sparsezscipy.constants.golden_ratiozscipy.constants.pir   NrO   )r=   r   rV   rT   rU   anyr2   r   rm   rl   rk   )rI   r   smats      rZ   test_SciPyPrinterr      s   A7D!*****99T?////a&&&&&sC!2B2BCsssC!2B2BCCCCC1vqk*D99T?BC C CQ-----99Q]]#'EEEE99QTT?222299QVV	)))r\   c                     aa \        R 4      w  oo\        \        VV3R l4       \        SS,           4      p V R9   g   Q hR# )zif elsec                  ,   < \        S S,           R R7      # )T)error_on_reserved)r9   )s1s2s   rZ   rc   ,test_pycode_reserved_words.<locals>.<lambda>   s    vb2gFr\   N)zelse_ + if_zif_ + else_)r   r>   re   r9   )py_strr   r   s    @@rZ   test_pycode_reserved_wordsr      s8    YFB
:FGBG_F3333r\   c                      \        R 4      w  rpW,          p\        V4      R8X  g   Q hW!,          p\        V4      R8X  g   Q hR# )za_{b} b a_{11}za_b*bza_11*bN)r   r9   )a_br   a_11r   s       rZ   test_issue_20762r      sC    +,LCD5D$<7"""6D$<8###r\   c                  H   \        4       p V P                  \        \        4      R R7      R8X  g   Q hV P                  ^\        \        4      ,          R R7      R8X  g   Q h\        RR/4      p V P                  \        \        4      RR7      R8X  g   Q hV P                  ^\        \        4      ,          RR7      R8X  g   Q h\	        4       p V P                  \        \        4      R R7      R	8X  g   Q hV P                  \        \        4      RR7      R
8X  g   Q h\        4       p V P                  \        \        4      R R7      R8X  g   Q hV P                  \        \        4      RR7      R8X  g   Q h\        4       p V P                  \        \        4      R R7      R8X  g   Q hV P                  \        \        4      RR7      R8X  g   Q h\        4       p V P                  \        \        4      R R7      R8X  g   Q hV P                  \        \        4      RR7      R8X  g   Q hR# )F)rationalrL   z1/math.sqrt(x)r`   r^   Tzx**(1/2)z	x**(-1/2)zmpmath.sqrt(x)z x**(mpmath.mpf(1)/mpmath.mpf(2))znumpy.sqrt(x)zsympy.sqrt(x)N)r8   
_print_Powr   rV   r6   r<   r=   r:   rX   s    rZ   	test_sqrtr      s   EDGe4FFFAd1gI6:JJJJzI67EDGd3zAAAAd1gI5DDDOEDGe48HHHHDGd3*+ + + NEDGe4GGGDGd3zAAANEDGe4GGGDGd3zAAANEDGe4GGGDGd3zAAAr\   c                  ~   ^ RI Hp  V ! \        4      p\        4       pVP	                  V4      R8X  g   Q h\        4       pVP	                  V4      R8X  g   Q h\        4       pVP	                  V4      R8X  g   Q h\        4       pVP	                  V4      R8X  g   Q h\        4       pVP	                  V4      R8X  g   Q hR# )r   )fracznumpy.mod(x, 1)zx % 1zmpmath.frac(x)z+sympy.functions.elementary.integers.frac(x)N)	#sympy.functions.elementary.integersr   rV   r<   rU   r=   r8   r6   r:   )r   r   rY   s      rZ   	test_fracr      s    87DNE=="3333NE=="3333E==')))OE=="2222NE=="OOOOr\   c                   ,   a  ] tR tRt o R tR tRtV tR# )CustomPrintedObjecti  c                    R # )r   rb   selfprinters   &&rZ   
_numpycodeCustomPrintedObject._numpycode  s    r\   c                    R # )mpmathrb   r   s   &&rZ   _mpmathcodeCustomPrintedObject._mpmathcode  s    r\   rb   N)__name__
__module____qualname____firstlineno__r   r   __static_attributes____classdictcell____classdict__s   @rZ   r   r     s      r\   r   c                      \        4       p \        4       P                  V 4      R 8X  g   Q h\        4       P                  V 4      R8X  g   Q hR# )r   r   N)r   r<   rU   r6   )objs    rZ   test_printmethodr     s@    

C>!!#&'111?""3'8333r\   c                  2    \        \        4      R 8X  g   Q hR# )NoneN)r9   r   rb   r\   rZ   test_codegen_ast_nodesr   "  s    $<6!!!r\   c                      \        4       p V P                  \        4      R 8X  g   Q hV P                  \        ) 4      R8X  g   Q hR# )zmath.nanzfloat('-inf')N)r8   rU   r   r   rX   s    rZ   test_issue_14283r   &  s:    E==+++=="000r\   c                  \    \        4       p V P                  \        ^4      4      R8X  g   Q hR# )rR   z(0, 1,)N)r<   
_print_seqrange)ns    rZ   test_NumPyPrinter_print_seqr   -  s$    A<<a!Y...r\   c                     ^ RI Hp Hp \        R4      pV ! V\        4      pV! V\        4      p\        4       pVP                  V4      R8X  g   Q hVP                  V4      R8X  g   Q h\        4       p\        RR/4      pW43 FL  p\        \        4      ;_uu_ 4        VP                  V4       RRR4       RVP                  V4      9   d   KL  Q h	  R#   + '       g   i     L.; i)	r   )
lowergamma
uppergammar~   z3scipy.special.gamma(a)*scipy.special.gammainc(a, x)z4scipy.special.gamma(a)*scipy.special.gammaincc(a, x)strictFNNot supported)'sympy.functions.special.gamma_functionsr   r   r   rV   r=   rU   r<   r8   r>   NotImplementedError)	r   r   r~   r   expr2rY   p_numpyp_pycoder   s	            rZ   test_issue_16535_16536r   3  s    PAq!Eq!ENE==#XXXX==#YYYYnG (E!23H'((OOE" )("2"24"8888 ((s   CC$c                    aaa ^ RI Hp  ^ RIHp V! V ! \        ) 4      \        ^ \
        34      pV! \        ^,          V ! \        \        ,          4      ,          \        \        ) \        3\        ^ \        34      pV! \        ^,          \        4      oV! \        ^,          \        ^34      o\        4       oSP                  V4      R8X  g   Q hSP                  V4      R8X  g   Q h\        \        VV3R l4       \        \        VV3R l4       \        4       oSP                  V4      R8X  g   Q hSP                  V4      R8X  g   Q h\        \        VV3R	 l4       \        \        VV3R
 l4       R# )r   )exp)Integralz>scipy.integrate.quad(lambda x: numpy.exp(-x), 0, numpy.inf)[0]zMscipy.integrate.nquad(lambda x, y: x**2*numpy.exp(x*y), ((-z, z), (0, z)))[0]c                  &   < SP                  S 4      # NrU   
indefiniterY   s   rZ   rc   test_Integral.<locals>.<lambda>S      j(Ar\   c                  &   < SP                  S 4      # r   r   
evaluateatrY   s   rZ   rc   r   T  r   r\   z6mpmath.quad(lambda x: mpmath.exp(-x), (0, mpmath.inf))z?mpmath.quad(lambda x, y: x**2*mpmath.exp(x*y), (-z, z), (0, z))c                  &   < SP                  S 4      # r   r   r   s   rZ   rc   r   Y  r   r\   c                  &   < SP                  S 4      # r   r   r   s   rZ   rc   r   Z  r   r\   N)&sympy.functions.elementary.exponentialr   sympy.integrals.integralsr   rV   r   rW   zr=   rU   r>   r   r6   )r   r   singledoubler   r   rY   s       @@@rZ   test_Integralr   G  s   :2c1"g1bz*Fad3qs8ma!QZ!Q;F!Q$"J!Q$A'JNE== $dddd== $ssss
 AB
 ABOE== $\\\\== $eeee
 AB
 ABr\   c                  |   ^ RI Hp Hp V ! \        4      pV! \        4      p\	        4       pVP                  V4      R8X  g   Q hVP                  V4      R8X  g   Q h\        4       p\        4       p\        4       pW#3 Fe  p\        \        4      ;_uu_ 4        VP                  V4       RRR4       \        \        4      ;_uu_ 4        VP                  V4       RRR4       Kg  	  VP                  V4      R8X  g   Q hVP                  V4      R8X  g   Q hR#   + '       g   i     Lw; i  + '       g   i     K  ; i)r   )fresnelcfresnelszscipy.special.fresnel(x)[1]zscipy.special.fresnel(x)[0]Nzmpmath.fresnelc(x)zmpmath.fresnels(x))'sympy.functions.special.error_functionsr   r   rV   r=   rU   r<   r8   r6   r>   r   )	r   r   r   r   rY   r   r   p_mpmathr   s	            rZ   test_fresnel_integralsr  ]  s    LQKEQKENE==#@@@@==#@@@@nG "HH'((OOD! )'((T" )(  E"&::::E"&:::: )((((s   DD*D'*D;c                     ^ RI Hp  V ! \        \        4      p\	        4       pVP                  V4      R8X  g   Q h\        4       pVP                  V4      R8X  g   Q h\        4       pVP                  V4      R8X  g   Q h\        RR/4      pVP                  V4      R8X  g   Q h\        4       pVP                  V4      R8X  g   Q hR# )r   )betazscipy.special.beta(x, y)z/(math.gamma(x)*math.gamma(y)/math.gamma(x + y))allow_unknown_functionsTzmpmath.beta(x, y)N)	&sympy.functions.special.beta_functionsr  rV   rW   r=   rU   r<   r8   r6   )r  r   rY   s      rZ   	test_betar  t  s    ;1:DNE=="<<<<NE=="SSSSE=="SSSS8$?@E=="SSSSOE==#6666r\   c                     ^ RI Hp Hp V ! \        4      pV! \        4      p\	        4       pVP                  V4      R8X  g   Q hVP                  V4      R8X  g   Q h\        RR/4      pRVP                  V4      9   g   Q hRVP                  V4      9   g   Q h\        RR/4      pRVP                  V4      9   g   Q hRVP                  V4      9   g   Q hR# )r   )airyaiairybizscipy.special.airy(x)[0]zscipy.special.airy(x)[2]r   Fr   N)sympy.functions.special.besselr
  r  rV   r=   rU   r<   r8   )r
  r  r   r   rY   s        rZ   	test_airyr    s    ?1IE1IENE==#======#====(E*+EemmE2222emmE2222x/0EemmE2222emmE2222r\   c                     ^ RI Hp Hp V ! \        4      pV! \        4      p\	        4       pVP                  V4      R8X  g   Q hVP                  V4      R8X  g   Q h\        RR/4      pRVP                  V4      9   g   Q hRVP                  V4      9   g   Q h\        RR/4      pRVP                  V4      9   g   Q hRVP                  V4      9   g   Q hR# )r   )airyaiprimeairybiprimezscipy.special.airy(x)[1]zscipy.special.airy(x)[3]r   Fr   N)r  r  r  rV   r=   rU   r<   r8   )r  r  r   r   rY   s        rZ   test_airy_primer    s    INENENE==#======#====(E*+EemmE2222emmE2222x/0EemmE2222emmE2222r\   c                      \        4       p V P                  \        \        4      4      R 8X  g   Q hV P                  \	        \        4      4      R8X  g   Q hV P                  \        \        4      4      R8X  g   Q hR# )znumpy.expm1(x)znumpy.log1p(x)zscipy.special.cosm1(x)N)r=   rU   r   rV   r   r   rX   s    rZ   !test_numerical_accuracy_functionsr    s]    NE==q"&6666==q"&6666==q"&>>>>r\   c            	      "   \        R R4      p \        R4      p\        RR4      \        RR4      \        RR4      rCp\        4       pVP	                  \        ^4      4      R8X  g   Q hVP	                  \        ^4      4      R8X  g   Q hVP	                  \        V ^^.4      4      R8X  g   Q hVP	                  V4      R8X  g   Q hVP	                  \        V . RO4      4      R8X  g   Q hVP	                  \        V ^ ^.^^.4      4      R	8X  g   Q hVP	                  \        V ^.^.4      4      R
8X  g   Q hVP	                  \        WW43,          WW43,          4      4      R8X  g   Q h\        4       pVP	                  \        ^4      4      R8X  g   Q hVP	                  \        ^4      4      R8X  g   Q hVP	                  \        V ^^.4      4      R8X  g   Q hVP	                  V4      R8X  g   Q hVP	                  \        V . RO4      4      R8X  g   Q hVP	                  \        V ^ ^.^^.4      4      R8X  g   Q hVP	                  \        V ^.^.4      4      R8X  g   Q hVP	                  \        WW43,          WW43,          4      4      R8X  g   Q hR# )r   Iijkznumpy.zeros((5,))znumpy.ones((5,))znumpy.einsum("abccd->abd", A)znumpy.einsum("abccc->abc", A)znumpy.einsum("aabbc->cab", A)znumpy.einsum("abcde->abe", A)zI = Iztensorflow.zeros((5,))ztensorflow.ones((5,))z)tensorflow.linalg.einsum("abccd->abd", A)z)tensorflow.linalg.einsum("abccc->abc", A)z)tensorflow.linalg.einsum("aabbc->cab", A)z)tensorflow.linalg.einsum("abcde->abe", A)N)   r     r  r  rO   rQ   )r     )rR   rS   r  )rB   r@   rA   r<   rU   rE   rF   rD   rC   r   r;   )r   r  r  r  r  rY   s         rZ   test_array_printerr    sZ   C%ACAUOSe_c#uoANE==1&*======!%);;;;==)!aU348WWWW==s"""==q'237VVVV==q1Q%!A78<[[[[==)!aS1#67;ZZZZ==AeHa!h78GCCCE==1&*BBBB==!%)@@@@==)!aU348cccc==s"""==q'237bbbb==q1Q%!A78<gggg==)!aS1#67;ffff==AeHa!h78GCCCr\   c                      ! R  R\         4      p V ! 4       p\        \        4      P                  \        RR7      pVP	                  V4      R8X  g   Q h\        \        \        4      P                  \        ^\        ^RR7      pVP	                  V4      R8X  g   Q h VP	                  \        \        4      P                  \        RR7      4       Q h  \         d   pR\        T4      9   g   Q h Rp?MRp?ii ; i TP	                  \        \        \        ^,          4      \        4      4       Q h  \         d   pR\        T4      9   g   Q h Rp?R# Rp?ii ; i)	c                   ,   a  ] tR tRt o R tR tRtV tR# )1test_custom_Derivative_methods.<locals>.MyPrinteri  c                F    Vw  pVw  pR V P                  V4      V3,          # )z#my_custom_cosm1(%s, deriv_order=%d)_print)r   args
seq_ordersargorders   &&&  rZ   _print_Derivative_cosm1Itest_custom_Derivative_methods.<locals>.MyPrinter._print_Derivative_cosm1  s)    DCFE8DKK<Le;TTTr\   c                f    Vw  r4Vw  rVR V P                  V4      V P                  V4      WV3,          # )z-my_custom_atan2(%s, %s, deriv1=%d, deriv2=%d)r!  )r   r#  r$  arg1arg2ord1ord2s   &&&    rZ   _print_Derivative_atan2Itest_custom_Derivative_methods.<locals>.MyPrinter._print_Derivative_atan2  s<    JD#JDBD!4;;t#4dF  r\   rb   N)r   r   r   r   r'  r.  r   r   r   s   @rZ   	MyPrinterr    s     	U
	 	r\   r0  FrM   z!my_custom_cosm1(x, deriv_order=1)z)my_custom_atan2(x, y, deriv1=2, deriv2=3)_print_Derivative_expm1Nz_print_Derivative()r=   r   rV   diffrU   r/   rW   r   r5   reprr   re   )r0  rI   cosm1_1	atan2_2_3es        rZ   test_custom_Derivative_methodsr7    s   L  	AAhmmAm.G99W!DDDDa  Aq!e <I99Y#NNNN			%(--E-23 	u * 4(DG3334
			*U1a4[+, 	u  /#tAw.../s0   3C C8C33C8<3D1 1E<EEN)zsympyr   sympy.codegenr   sympy.codegen.astr   sympy.codegen.cfunctionsr   r   sympy.codegen.scipy_nodesr   sympy.codegen.matrix_nodesr	   
sympy.corer
   r   r   r   r   r   r   r   r   r   r   r   sympy.core.numbersr   sympy.core.singletonr   sympy.functionsr   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   (sympy.functions.elementary.trigonometricr/   sympy.logicr0   r1   sympy.matricesr2   r3   r4   sympy.printing.codeprinterr5   sympy.printing.pycoder6   r7   r8   r9   r:   sympy.printing.tensorflowr;   sympy.printing.numpyr<   r=   sympy.testing.pytestr>   r?   sympy.tensorr@   rA   0sympy.tensor.array.expressions.array_expressionsrB   rC   rD   rE   rF   sympy.externalrG   r   rH   rV   rW   r   rI   r[   rf   ri   rr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r  r  r7  rb   r\   rZ   <module>rM     s-    $ " 1 + 2 M M M * ! " v  v  v  v  v  v  v :  ? ? E  8 ; - ) ~ ~ ( < '
1a*3ZJ3.:2?j&*"4$B6P($ 4"1/9(C,;.7(3$3&?D4 r\   