
    \h9R                     P   S SK Jr  S SKJr  S SKJr  SSKJrJrJ	r	J
r
JrJr  SSKJr  SR                  5       r\R"                  " 5        V Vs/ s H  u  pU \;  d  M  X4PM     snn r\" \40 SS	S
SSSSSSSSSSS.D6rSSSSSS.r\R#                  5        V Vs0 s H  u  pU SU-   _M     snn r\R#                  5        V Vs0 s H  u  pU SU-   _M     snn r " S S\\5      r\ H  r\" \S\ 3\
5        M     \ H  r\" \S\ 3\	5        M     0 S S!_S"S"_S#S#_S$S%_S&S'_S(S)_S*S+_S,S,_S-S-_S.S._S/S/_S0S1_S2S3_S4S4_S5S6_S7S8_S9S:_S;S<S=S>S?S@SASBSC.ErSDSSE.r\R#                  5        V Vs0 s H  u  pU SFU-   _M     snn r\R#                  5        V Vs0 s H  u  pU SGU-   _M     snn r " SH SI\5      r \ H  r\" \ S\ 3\
5        M     \ H  r\" \ S\ 3\	5        M     \R#                  5        V Vs0 s H  u  pU SJU-   _M     snn r!\R#                  5        V Vs0 s H  u  pU SJU-   _M     snn r" " SK SL\5      r#\! H  r\" \#S\ 3\
5        M     \" H  r\" \#S\ 3\	5        M     \R#                  5        V Vs0 s H  u  pU SMU-   _M     snn r$\R#                  5        V Vs0 s H  u  pU SMU-   _M     snn r% " SN SO\5      r&\$ H  r\" \&S\ 3\
5        M     \% H  r\" \&S\ 3\	5        M     gPs  snn f s  snn f s  snn f s  snn f s  snn f s  snn f s  snn f s  snn f s  snn f )Q    )S)Lambda)Pow   )PythonCodePrinter_known_functions_math_print_known_const_print_known_func_unpack_integral_limitsArrayPrinter)CodePrinterz!erf erfc factorial gamma loggammaarccosarccosharcsinarcsinharctanarctan2arctanhexp2sign	logaddexp
logaddexp2isinfisnan)acosacoshasinasinhatanatan2atanhr   r   r   r   r   r   epieuler_gammananinf)Exp1Pi
EulerGammaNaNInfinityznumpy.c                     ^  \ rS rSrSrSr\r\r	S2U 4S jjr
S rS rS rS rS	 rS
 rS rS rS rS rS rS rS rS rS rS rS rU 4S jrS rS rS rS3S jr S\!4S jr"S r#S r$S r%S  r&S! r'S" r(S# r)S$ r*S% r+S& r,S' r-S( r.S) r/S* r0S+ r1S,r2S-r3S.r4S/r5S0r6\7Rp                  r9\7Rp                  r:\7Rp                  r;\7Rp                  r<S1r=U =r>$ )4NumPyPrinter%   zU
Numpy printer which handles vectorized piecewise functions,
logical operators, etc.
numpyc                    > SR                  U R                  5      U l        SR                  U R                  5      U l        0 [        R
                  EU R
                  EU l        [        TU ]  US9  g)z
`settings` is passed to CodePrinter.__init__()
`module` specifies the array module to use, currently 'NumPy', 'CuPy'
or 'JAX'.
zPython with {}z_{}codesettingsN)format_modulelanguageprintmethodr   _kfsuper__init__selfr2   	__class__s     L/var/www/auris/envauris/lib/python3.13/site-packages/sympy/printing/numpy.pyr9   NumPyPrinter.__init__/   s^     )//=$++DLL98'++8txx8(+    c                 \   ^  SnSR                  UR                  U 4S jU 5       5      5      $ )z+General sequence printer: converts to tuple, z({},)c              3   F   >#    U  H  nTR                  U5      v   M     g 7fN_print).0itemr;   s     r=   	<genexpr>*NumPyPrinter._print_seq.<locals>.<genexpr>B   s     ,O34T[[->->3   !)r3   join)r;   seq	delimiters   `  r=   
_print_seqNumPyPrinter._print_seq=   s(     	~~inn,O3,OOPPr?   c                 F    SU R                  [        R                  5      -   $ )N-)rE   r   r+   r;   exprs     r=   _print_NegativeInfinity$NumPyPrinter._print_NegativeInfinityD   s    T[[,,,r?   c                 X  ^  UR                  5       S   [        R                  LaR  UR                  5       S   UR                  5       S   /-   nSR                  SR	                  U 4S jU 5       5      5      $ SR                  SR	                  U 4S jUR
                   5       5      5      $ )zMatrix multiplication printerr   r   ({})z).dot(c              3   F   >#    U  H  nTR                  U5      v   M     g 7frC   rD   rF   ir;   s     r=   rH   -NumPyPrinter._print_MatMul.<locals>.<genexpr>K   s     .Qy!t{{1~~yrJ   c              3   F   >#    U  H  nTR                  U5      v   M     g 7frC   rD   rY   s     r=   rH   r[   L   s     *M9a4;;q>>9rJ   )as_coeff_matricesr   Oner3   rK   args)r;   rS   	expr_lists   `  r=   _print_MatMulNumPyPrinter._print_MatMulG   s    !!#A&aee3..03d6L6L6Nq6Q4SSI==.Qy.Q!QRR}}X]]*M499*MMNNr?   c                     SR                  U R                  U R                  S-   5      U R                  UR                  S   5      U R                  UR                  S   5      5      $ )zMatrix power printerz
{}({}, {})z.linalg.matrix_powerr   r   r3   _module_formatr4   rE   r_   rR   s     r=   _print_MatPowNumPyPrinter._print_MatPowN   sU    ""4#6#6t||F\7\#]KK		!%t{{499Q<'@B 	Br?   c                     SR                  U R                  U R                  S-   5      U R                  UR                  S   5      5      $ )zMatrix inverse printer{}({})z.linalg.invr   rd   rR   s     r=   _print_InverseNumPyPrinter._print_InverseS   s=    t224<<-3OPKK		!%' 	'r?   c                 *   UR                   u  p#UR                  S   S:w  a  UR                  nUR                  S   S:w  a  UR                  nU R                  U R                  S-   5      < SU R                  U5      < SU R                  U5      < S3$ )Nr   r   z.dot(rA   ))r_   shapeTre   r4   rE   )r;   rS   arg1arg2s       r=   _print_DotProductNumPyPrinter._print_DotProductX   sz     YY
::a=A66D::a=A66D#224<<&3HI#{{40#{{402 	2r?   c                     U R                  U R                  S-   5      < SU R                  UR                  5      < SU R                  UR                  5      < S3$ )Nz.linalg.solverm   rA   rn   )re   r4   rE   matrixvectorrR   s     r=   _print_MatrixSolveNumPyPrinter._print_MatrixSolvee   sC    #224<</3QR#{{4;;7#{{4;;79 	9r?   c                     SR                  U R                  U R                  S-   5      U R                  UR                  5      5      $ )Nri   z.zerosr3   re   r4   rE   ro   rR   s     r=   _print_ZeroMatrixNumPyPrinter._print_ZeroMatrixj   s9    t224<<(3JKKK

#% 	%r?   c                     SR                  U R                  U R                  S-   5      U R                  UR                  5      5      $ )Nri   z.onesr{   rR   s     r=   _print_OneMatrixNumPyPrinter._print_OneMatrixn   s9    t224<<'3IJKK

#% 	%r?   c                   ^  SSK JnJn  UR                  n[	        U[
        5      (       d  [        X#4U" X#5      5      nSR                  T R                  T R                  S-   5      SR                  U 4S jUR                  S    5       5      T R                  UR                  S   5      T R                  UR                  5      5      $ )Nr   )rZ   jz{}(lambda {}: {}, {})z.fromfunctionrA   c              3   F   >#    U  H  nTR                  U5      v   M     g 7frC   rD   rF   argr;   s     r=   rH   5NumPyPrinter._print_FunctionMatrix.<locals>.<genexpr>x   s     @-3dkk#&&-rJ   r   )	sympy.abcrZ   r   lamda
isinstancer   r3   re   r4   rK   r_   rE   ro   )r;   rS   rZ   r   r   s   `    r=   _print_FunctionMatrix"NumPyPrinter._print_FunctionMatrixr   s    "

%((A65;/E&--d.A.A$,,Q`B`.aII@%**Q-@@KK

1&DJJ(?A 	Ar?   c                 $  ^ ^ T R                  T R                  S-   5      mSR                  UU 4S jUR                  S S  5       5      SR	                  T R                  UR                  S   5      S[        UR                  5      S-
  -  5      -   $ )N	.multiply c              3   f   >#    U  H&  nS R                  TTR                  U5      5      v   M(     g7fz{}({}, Nr3   rE   rF   r   funcr;   s     r=   rH   6NumPyPrinter._print_HadamardProduct.<locals>.<genexpr>}   1      '% !''dkk#.>??%   .1{}{}rn   r   re   r4   rK   r_   r3   rE   lenr;   rS   r   s   ` @r=   _print_HadamardProduct#NumPyPrinter._print_HadamardProduct{   s}    ""4<<+#=>ww 'yy"~' ')/t{{499R=7Q3tyy>A%&*(( 	(r?   c                 $  ^ ^ T R                  T R                  S-   5      mSR                  UU 4S jUR                  S S  5       5      SR	                  T R                  UR                  S   5      S[        UR                  5      S-
  -  5      -   $ )Nz.kronr   c              3   f   >#    U  H&  nS R                  TTR                  U5      5      v   M(     g7fr   r   r   s     r=   rH   7NumPyPrinter._print_KroneckerProduct.<locals>.<genexpr>   r   r   r   r   rn   r   r   r   s   ` @r=   _print_KroneckerProduct$NumPyPrinter._print_KroneckerProduct   s}    ""4<<'#9:ww 'yy"~' ')/t{{499R=7Q3tyy>A%&*(( 	(r?   c                     SR                  U R                  U R                  S-   5      U R                  U R                  S-   5      U R                  UR                  S   5      5      $ )Nz
{}({}({}))z
.conjugatez
.transposer   rd   rR   s     r=   _print_AdjointNumPyPrinter._print_Adjoint   sW    ""| ;<| ;<KK		!%' 	'r?   c                     SR                  U R                  U R                  S-   5      U R                  UR                  5      5      nSR                  U R                  U R                  S-   5      U5      $ )Nri   z.diagz{}({}, (-1, 1))z.reshape)r3   re   r4   rE   r   )r;   rS   vects      r=   _print_DiagonalOfNumPyPrinter._print_DiagonalOf   sg    w 67KK!# !''z 9:DB 	Br?   c                     SR                  U R                  U R                  S-   5      U R                  UR                  S   5      5      $ )Nri   z	.diagflatr   rd   rR   s     r=   _print_DiagMatrixNumPyPrinter._print_DiagMatrix   s=    t224<<+3MNKK		!%' 	'r?   c           
      >   SR                  U R                  U R                  S-   5      U R                  UR                  5      U R                  U R                  S-   5      U R                  UR
                  S   5      U R                  UR
                  S   5      5      $ )Nz{}({}, {}({}, {}))r   .eyer   r   )r3   re   r4   rE   r   ro   rR   s     r=   _print_DiagonalMatrix"NumPyPrinter._print_DiagonalMatrix   sz    #**4+>+>t||k?Y+ZKK!4#6#6t||f7L#MKK

1&DJJqM(BD 	Dr?   c                   ^ ^^^ SSK JmJm  UU U4S jmSR                  SR	                  U 4S jUR
                   5       5      5      nSR                  SR	                  U4S jUR
                   5       5      5      nSR                  T R                  T R                  S	-   5      X2T R                  [        R                  5      5      $ )
zPiecewise function printerr   )ITEsimplify_logicc                    > U R                  T5      (       a  TR                  T" U 5      5      $ TR                  U 5      $ )z#Problem having an ITE in the cond. )hasrE   )condr   r;   r   s    r=   
print_cond1NumPyPrinter._print_Piecewise.<locals>.print_cond   s3    xx}}{{>$#788{{4((r?   z[{}],c              3   Z   >#    U  H   nTR                  UR                  5      v   M"     g 7frC   )rE   rS   r   s     r=   rH   0NumPyPrinter._print_Piecewise.<locals>.<genexpr>   s!     &R	t{{388'<'<	s   (+c              3   H   >#    U  H  nT" UR                   5      v   M     g 7frC   )r   )rF   r   r   s     r=   rH   r      s     &Qyz#((';';ys   "z{}({}, {}, default={})z.select)sympy.logic.boolalgr   r   r3   rK   r_   re   r4   rE   r   r*   )r;   rS   exprscondsr   r   r   s   `   @@@r=   _print_PiecewiseNumPyPrinter._print_Piecewise   s    ;	) chh&R		&RRSchh&Qtyy&QQR
 (..y 895KK  	 r?   c                 6  > SSSSSSS.nUR                   U;   aq  U R                  UR                  5      nU R                  UR                  5      nSR	                  U R                  U R                  S	-   X!R                      -   5      X4S
9$ [        TU ]!  U5      $ )z.Relational printer for Equality and Unequalityequal	not_equalless
less_equalgreatergreater_equal)z==z!=<z<=>z>=z{op}({lhs}, {rhs}).)oplhsrhs)	rel_oprE   r   r   r3   re   r4   r8   _print_Relational)r;   rS   r   r   r   r<   s        r=   r   NumPyPrinter._print_Relational   s     !
 ;;"++dhh'C++dhh'C'..$2E2EdllUXFXY[\g\gYhFh2i36 / A Aw(..r?   c                    ^  SR                  T R                  T R                  S-   5      SR                  U 4S jUR                   5       5      5      $ )Logical And printer{}.reduce(({}))z.logical_andr   c              3   F   >#    U  H  nTR                  U5      v   M     g 7frC   rD   rY   s     r=   rH   *NumPyPrinter._print_And.<locals>.<genexpr>   s0       eH  ~Gxyeiepepqreses  ~GrJ   r3   re   r4   rK   r_   rR   s   ` r=   
_print_AndNumPyPrinter._print_And   sc    
 !''(;(;DLL><Y(Z\_\d\d  eH  ~B  ~G  ~G  eH  ]H  I  	Ir?   c                    ^  SR                  T R                  T R                  S-   5      SR                  U 4S jUR                   5       5      5      $ )Logical Or printerr   z.logical_orr   c              3   F   >#    U  H  nTR                  U5      v   M     g 7frC   rD   rY   s     r=   rH   )NumPyPrinter._print_Or.<locals>.<genexpr>   s0       dG  }Fwxdhdodopqdrdr  }FrJ   r   rR   s   ` r=   	_print_OrNumPyPrinter._print_Or   sc    
 !''(;(;DLL=<X(Y[^[c[c  dG  }A  }F  }F  dG  \G  H  	Hr?   c                    ^  SR                  T R                  T R                  S-   5      SR                  U 4S jUR                   5       5      5      $ )zLogical Not printerri   z.logical_notr   c              3   F   >#    U  H  nTR                  U5      v   M     g 7frC   rD   rY   s     r=   rH   *NumPyPrinter._print_Not.<locals>.<genexpr>   s$     [~t}op\`\g\ghi\j\jt}rJ   r   rR   s   ` r=   
_print_NotNumPyPrinter._print_Not   sC    
 t224<<.3PQSVS[S[[~txt}t}[~S~r?   c                    UR                   R                  (       aH  UR                   R                  (       a-  [        UR                  UR                   R                  5       SS9nU R                  XU R                  S-   S9$ )NF)evaluatez.sqrt)rationalsqrt)exp
is_integeris_negativer   baseevalf_hprint_Powr4   )r;   rS   r   s      r=   
_print_PowNumPyPrinter._print_Pow   sW    88488#7#7tyy$((.."2UCDdllW>TUUr?   r   c                 "   [        U5      S:X  a  [        SU 35      e[        U5      S:X  a  U R                  US   5      $ U R                  S5      nU Vs/ s H  o@R                  U5      PM     nnU SU SSR	                  U5       S3$ s  snf )	Nr   zNeed at least one argument for r   zfunctools.reducerm   z, [rA   z]))r   NotImplementedErrorrE   re   rK   )r;   r   r_   _reducer   s_argss         r=   _helper_minimum_maximum$NumPyPrinter._helper_minimum_maximum   s    t9>%(Gt&LMMY!^;;tAw''%%&89.23ds++c"d3!B4s499V#4"5R88 4s   Bc                 $    U R                  U5      $ rC   )_print_minimumrR   s     r=   
_print_MinNumPyPrinter._print_Min       ""4((r?   c                     SR                  U R                  U R                  S-   5      U R                  UR                  5      U R                  UR
                  5      5      $ )N{}({}, axis={})z.aminr3   re   r4   rE   arrayaxisrR   s     r=   _print_aminNumPyPrinter._print_amin   c     ''(;(;DLL7<R(SUYU`U`aeakakUlnrnynyz~  {D  {D  oE  F  	Fr?   c                 x    U R                  U R                  S-   5      nU R                  " U/UR                  Q76 $ )Nz.minimumre   r4   r   r_   r;   rS   r   s      r=   r   NumPyPrinter._print_minimum   5      
!:;++B;;;r?   c                 $    U R                  U5      $ rC   )_print_maximumrR   s     r=   
_print_MaxNumPyPrinter._print_Max   r   r?   c                     SR                  U R                  U R                  S-   5      U R                  UR                  5      U R                  UR
                  5      5      $ )Nr   z.amaxr   rR   s     r=   _print_amaxNumPyPrinter._print_amax   r  r?   c                 x    U R                  U R                  S-   5      nU R                  " U/UR                  Q76 $ )Nz.maximumr  r  s      r=   r
  NumPyPrinter._print_maximum   r  r?   c                     U R                  U R                  S-   5      < SU R                  UR                  S   5      < S3$ )Nz.anglerm   r   rn   re   r4   rE   r_   rR   s     r=   
_print_argNumPyPrinter._print_arg   s7    ..t||h/FGUYU^U^_`UaIbccr?   c                     U R                  U R                  S-   5      < SU R                  UR                  S   5      < S3$ )Nz.imagrm   r   rn   r  rR   s     r=   	_print_imNumPyPrinter._print_im   7    ..t||g/EFTXT]T]^_T`Habbr?   c                    ^  T R                  T R                  S-   5      < SSR                  U 4S jUR                   5       5      < S3$ )Nz.modrm   rA   c              3   F   >#    U  H  nTR                  U5      v   M     g 7frC   rD   r   s     r=   rH   *NumPyPrinter._print_Mod.<locals>.<genexpr>  s     3#T[[rJ   rn   )re   r4   rK   r_   rR   s   ` r=   
_print_ModNumPyPrinter._print_Mod   s<    ..t||f/DEtyy33H5 6 	6r?   c                     U R                  U R                  S-   5      < SU R                  UR                  S   5      < S3$ )Nz.realrm   r   rn   r  rR   s     r=   	_print_reNumPyPrinter._print_re  r  r?   c                     U R                  U R                  S-   5      < SU R                  UR                  S   [        R
                  -  5      < S3$ )Nz.sincrm   r   rn   )re   r4   rE   r_   r   r(   rR   s     r=   _print_sincNumPyPrinter._print_sinc  sC    ..t||g/EFTXT]T]^_T`abaeaeTeHfggr?   c                    SUR                   ;   aK  U R                  U R                   SU R                   35      nU SU R	                  UR                   5       S3$ U R
                  R                  UR                  R                  S 5      nUc  U R                  U R                   S35      nU< SU R	                  UR                  5       5      < S3$ )Nr   r   rm   rn   .array)
ro   re   r4   _zerosrE   known_functionsgetr<   __name__tolistr   s      r=   _print_MatrixBaseNumPyPrinter._print_MatrixBase	  s    

?&&$,,q'FGDV1T[[45Q77##''(?(?F<&&$,,v'>?DT[[]!;<<r?   c                     UR                   n[        S U 5       5      (       aB  U R                  U R                  S-   5      < SU R	                  UR                   S   5      < S3$ [        S5      e)Nc              3   8   #    U  H  oR                   v   M     g 7frC   )
is_Integer)rF   dims     r=   rH   /NumPyPrinter._print_Identity.<locals>.<genexpr>  s     /#~~s   r   rm   r   rn   zFSymbolic matrix dimensions are not yet supported for identity matrices)ro   allre   r4   rE   r   )r;   rS   ro   s      r=   _print_IdentityNumPyPrinter._print_Identity  s]    

////#224<<&3HI4;;W[WaWabcWdKeff%&noor?   c                     SR                  U R                  U R                  S-   5      U R                  UR                  S   R                  5       5      5      $ )Nri   z.blockr   )r3   re   r4   rE   r_   r+  rR   s     r=   _print_BlockMatrixNumPyPrinter._print_BlockMatrix  sH    t224<<(3JK!%TYYq\-@-@-B!CE 	Er?   c                    UR                  5       S:X  a8  U R                  U R                   S35      nU SU R                  US   5       S3$ SUR                  ;   aK  U R                  U R                   SU R
                   35      nU SU R                  UR                  5       S3$ U R                  U R                   S35      nU SU R                  UR                  5       5       S3$ )Nr   r&  rm    rn   r   )rankre   r4   rE   ro   r'  r+  r   s      r=   _print_NDimArrayNumPyPrinter._print_NDimArray  s    99;!&&$,,v'>?DV1T[[b23155

?&&$,,q'FGDV1T[[45Q77""dll^6#:;qT[[]34A66r?   addeinsum	transposeoneszeros)r7   r5   r6   rC   )F)?r*  
__module____qualname____firstlineno____doc__r4   _numpy_known_functionsr7   _numpy_known_constants_kcr9   rN   rT   ra   rf   rj   rs   rx   r|   r   r   r   r   r   r   r   r   r   r   r   r   r   r   strr   r   r  r   r  r  r
  r  r  r  r   r#  r,  r4  r7  r<  _add_einsum
_transpose_onesr'  r   _print_not_supported_print_lowergamma_print_uppergamma_print_fresnelc_print_fresnels__static_attributes____classcell__r<   s   @r=   r-   r-   %   s>   
 G
 C
 C,Q-OB
'
29
%%A(('B'D
 &/"IH@V9# 9)F<)F<dc6ch=pE7 DGJEF#88#88!66O!66Or?   r-   _print_Eiexpierferfcbesseljjvbesselyyvbesseliivbesselkkvcosm1powm1	factorialgammaloggammagammalndigammapsi	polygammaRisingFactorialpochjacobieval_jacobi
gegenbauereval_gegenbauereval_chebyteval_chebyueval_legendreeval_hermiteeval_laguerreeval_genlaguerrebetalambertw)
chebyshevt
chebyshevulegendrehermitelaguerreassoc_laguerrery  LambertWgolden_ratio)GoldenRatior(   zscipy.special.zscipy.constants.c                      ^  \ rS rSr0 \R
                  E\Er0 \R                  E\ErSU 4S jjr	S r
\
rS rS rS rS rS rS	 rS
 rS rS rS rS rS rS rS rS rS rSrU =r$ )SciPyPrinteri\  c                 .   > [         TU ]  US9  SU l        g )Nr1   zPython with SciPy and NumPy)r8   r9   r5   r:   s     r=   r9   SciPyPrinter.__init__a  s    (+5r?   c                    / / / pCnUR                  5       R                  5        H;  u  u  pVnUR                  U5        UR                  U5        UR                  U5        M=     SR                  U R	                  S5      XBX1R
                  S9$ )Nz+{name}(({data}, ({i}, {j})), shape={shape})zscipy.sparse.coo_matrix)namedatarZ   r   ro   )todokitemsappendr3   re   ro   )r;   rS   rZ   r   r  rcvs           r=   _print_SparseRepMatrix#SciPyPrinter._print_SparseRepMatrixe  s    Rd++-IFQAHHQKHHQKKKN .
 =CC$$%>?azz D 
 	
r?   c           	          SR                  U R                  S5      U R                  UR                  S   5      U R                  UR                  S   5      U R                  UR                  S   5      5      $ )Nz{0}({2}, {1}, {3})zscipy.special.lpmvr   r      r3   re   rE   r_   rR   s     r=   _print_assoc_legendre"SciPyPrinter._print_assoc_legendret  s`    #** 45KK		!%KK		!%KK		!%	' 	'r?   c           	          SR                  U R                  S5      U R                  S5      U R                  UR                  S   5      U R                  UR                  S   5      5      $ )N{0}({2})*{1}({2}, {3})scipy.special.gammazscipy.special.gammaincr   r   r  rR   s     r=   rP  SciPyPrinter._print_lowergamma{  s[    '.. 56 89KK		!%KK		!%	' 	'r?   c           	          SR                  U R                  S5      U R                  S5      U R                  UR                  S   5      U R                  UR                  S   5      5      $ )Nr  r  zscipy.special.gammainccr   r   r  rR   s     r=   rQ  SciPyPrinter._print_uppergamma  s[    '.. 56 9:KK		!%KK		!%	' 	'r?   c                    U R                  S5      nU R                  S5      nUR                   Vs/ s H  o@R                  U5      PM     nnSU SUS    SUS    SUS    SU SUS    SUS    SUS	    S
U SUS    SUS    S3$ s  snf )Nscipy.special.betainczscipy.special.betarm   r   rA   r      z) - r  z))             * rn   )re   r_   rE   )r;   rS   betaincry  r   r_   s         r=   _print_betaincSciPyPrinter._print_betainc  s    %%&=>""#78,0II6ISC I67)1T!WIRQy47)4y$q'RTUYZ[U\T]]_`def`g_h ifAd1gYba	, 	, 7s   B	c           
      *   SR                  U R                  S5      U R                  UR                  S   5      U R                  UR                  S   5      U R                  UR                  S   5      U R                  UR                  S   5      5      $ )Nz'{0}({1}, {2}, {4}) - {0}({1}, {2}, {3})r  r   r   r  r  r  rR   s     r=   _print_betainc_regularized'SciPyPrinter._print_betainc_regularized  st    8?? 78KK		!%KK		!%KK		!%KK		!%' 	'r?   c                 |    SR                  U R                  S5      U R                  UR                  S   5      5      $ )N	{}({})[0]scipy.special.fresnelr   r  rR   s     r=   rS  SciPyPrinter._print_fresnels  8    !!##$;<DIIaL)+ 	+r?   c                 |    SR                  U R                  S5      U R                  UR                  S   5      5      $ )N	{}({})[1]r  r   r  rR   s     r=   rR  SciPyPrinter._print_fresnelc  r  r?   c                 |    SR                  U R                  S5      U R                  UR                  S   5      5      $ )Nr  scipy.special.airyr   r  rR   s     r=   _print_airyaiSciPyPrinter._print_airyai  8    !!##$89DIIaL)+ 	+r?   c                 |    SR                  U R                  S5      U R                  UR                  S   5      5      $ )Nr  r  r   r  rR   s     r=   _print_airyaiprimeSciPyPrinter._print_airyaiprime  r  r?   c                 |    SR                  U R                  S5      U R                  UR                  S   5      5      $ )Nz	{}({})[2]r  r   r  rR   s     r=   _print_airybiSciPyPrinter._print_airybi  r  r?   c                 |    SR                  U R                  S5      U R                  UR                  S   5      5      $ )Nz	{}({})[3]r  r   r  rR   s     r=   _print_airybiprimeSciPyPrinter._print_airybiprime  r  r?   c                 R    U R                  UR                  " UR                  6 5      $ rC   rE   _eval_rewrite_as_zetar_   rR   s     r=   _print_bernoulliSciPyPrinter._print_bernoulli  s     {{455tyyABBr?   c                 R    U R                  UR                  " UR                  6 5      $ rC   r  rR   s     r=   _print_harmonicSciPyPrinter._print_harmonic  s     {{455tyyABBr?   c           	        ^  [        U5      u  p#[        U5      S:X  a7  T R                  S5      nS[        [	        T R
                  US   5      5      -  nO;T R                  S5      nSR                  SR                  U 4S jU 5       5      5      nS	R                  USR                  [	        T R
                  U5      5      T R                  UR                  S   5      U5      $ )
Nr   zscipy.integrate.quadz%s, %sr   zscipy.integrate.nquadrW   rA   c              3   h   >#    U  H'  nS [        [        TR                  U5      5      -  v   M)     g7f)z(%s, %s)N)tuplemaprE   )rF   lr;   s     r=   rH   /SciPyPrinter._print_Integral.<locals>.<genexpr>  s*      0IAGA
U3t{{A#677s   /2z{}(lambda {}: {}, {})[0])	r   r   re   r  r  rE   r3   rK   r_   )r;   r"   integration_varslimits
module_str	limit_strs   `     r=   _print_IntegralSciPyPrinter._print_Integral  s    #:1#= v;!,,-CDJ 5T[[&))D#EEI,,-DEJdii 0IAG0I 'I JI *00		#dkk+;<=AFF1I&	 	r?   c                 |    SR                  U R                  S5      U R                  UR                  S   5      5      $ )Nr  scipy.special.sicir   r  rR   s     r=   	_print_SiSciPyPrinter._print_Si  r  r?   c                 |    SR                  U R                  S5      U R                  UR                  S   5      5      $ )Nr  r  r   r  rR   s     r=   	_print_CiSciPyPrinter._print_Ci  r  r?   )r5   rC   )r*  rC  rD  rE  r-   r7   _scipy_known_functionsrI  _scipy_known_constantsr9   r  _print_ImmutableSparseMatrixr  rP  rQ  r  r  rS  rR  r  r  r  r  r  r  r  r  r  rT  rU  rV  s   @r=   r  r  \  s    
8\
8!7
8C
8\
8!7
8C6

 $: ''','+
+
+
+
+
+
CC$+
+ +r?   r  zcupy.c                   <   ^  \ rS rSrSrSr\r\r	SU 4S jjr
SrU =r$ )CuPyPrinteri  zT
CuPy printer which handles vectorized piecewise functions,
logical operators, etc.
cupyc                     > [         TU ]  US9  g )Nr1   )r8   r9   r:   s     r=   r9   CuPyPrinter.__init__  s    (+r?   r:  rC   )r*  rC  rD  rE  rF  r4   _cupy_known_functionsr7   _cupy_known_constantsrI  r9   rT  rU  rV  s   @r=   r  r    s#    
 G
C
C, ,r?   r  z
jax.numpy.c                   H   ^  \ rS rSrSrSr\r\r	SU 4S jjr
S rS rSrU =r$ )	
JaxPrinteri  zS
JAX printer which handles vectorized piecewise functions,
logical operators, etc.
z	jax.numpyc                 .   > [         TU ]  US9  SU l        g )Nr1   _jaxcode)r8   r9   r6   r:   s     r=   r9   JaxPrinter.__init__  s    (+%r?   c                    ^  SR                  T R                  T R                  S-   5      T R                  T R                  5      SR                  U 4S jUR                   5       5      5      $ )r   {}({}.asarray([{}]), axis=0)z.allr   c              3   F   >#    U  H  nTR                  U5      v   M     g 7frC   rD   rY   s     r=   rH   (JaxPrinter._print_And.<locals>.<genexpr>       7YT[[^^YrJ   r   rR   s   ` r=   r   JaxPrinter._print_And	  U    -44v 56-HH7TYY77
 	
r?   c                    ^  SR                  T R                  T R                  S-   5      T R                  T R                  5      SR                  U 4S jUR                   5       5      5      $ )r   r  z.anyr   c              3   F   >#    U  H  nTR                  U5      v   M     g 7frC   rD   rY   s     r=   rH   'JaxPrinter._print_Or.<locals>.<genexpr>  r  rJ   r   rR   s   ` r=   r   JaxPrinter._print_Or  r  r?   )r6   rC   )r*  rC  rD  rE  rF  r4   _jax_known_functionsr7   _jax_known_constantsrI  r9   r   r   rT  rU  rV  s   @r=   r  r    s-     G
C
C&


 
r?   r  N)'
sympy.corer   sympy.core.functionr   sympy.core.powerr   pycoder   r   r	   r
   r   r   codeprinterr   split_not_in_numpyr  	_in_numpydict_known_functions_numpy_known_constants_numpyrG  rH  r-   r   setattrconst_known_functions_scipy_special _known_constants_scipy_constantsr  r  r  r  r  r  r  r  r  )kr  s   00r=   <module>r     s}    &   K  K $ 499; 5 ; ; =X =-AWVaV =X	i ,  " 
  7M6R6R6TU6Tda!X\/6TU 6L6R6R6TU6Tda!X\/6TU K7<!2 K7Z #DLGD6*,=> # $ELGE7+-?@ $"&"	5" F" t	"
 t" t" t" W" W" " W" 	" u" " v"  m!"" ##"$  (3" : "
$   @^?c?c?ef?etq!.22?ef AaAgAgAijAi!0144Aij {+< {+z #DLGD6*,=> # $ELGE7+-?@ $ 6L5Q5Q5ST5STQWq[5ST 5K5Q5Q5ST5STQWq[5ST ,, , "DK74&)+<= " #EK75'*,>? # 9O8T8T8VW8V<!++8VW 8N8T8T8VW8V<!++8VW 
 
> !DJ'$(*;< ! "EJ'%)+=> "g Y2 VUl	 gjL UT, XWs<   K2K2K8K>)LL
2LL;L$L"