+
    i(i                        R t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^RIHtH	t	 ^RI	H
t
 . RNRNRNRNR	NR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-NR.NR/NR0NR1NR2NR3NR4NR5NR6NR7NR8NR9NR:NR;NR<NR=NR>NR?NR@NRANRBNRCNRDNRENRFNRGNRHNRINRJNRKNRLNRMNRNNRONRPNRQNRRNRSNRTNRUNRVNRWNRXNRYNRZNR[NR\NR]NR^NR_NR`NRaNRbNRcNRdNt]P                  t]P                  t/ t. t^tRe tRf tRg tRh tRi tRj tRk tRl tRm tRn tRo tRp tRq tRr tRs t Rt t!Ru t"Rv t#Rw t$Rx t%Ry t&Rz t'R{ t(R| t)R} t*R~ t+R t,R t-R t.R t/R t0R t1R t2R t3R t4R t5R t6R t7R t8R t9R t:R t;R t<R t=R t>R t?R t@R tAR tBR tCR tDR tER tFR tGR tHR tIR tJR tKR tLR tMR tNR tOR tPR tQR tRR tSR tTR tUR tVR tWR tXR tYR tZR t[R t\R t]R t^R t_]QR]RR]SR]TR]WR]VR]LR][R]]R]^R]_R/t`R taR tbR tcR tdR teR tfR tgR thR tiR tjR tkR tlR tmR tnR to ! R R]p4      tq ! R R_4      trR tsR ttR tuR tvR twRR ltxR ty/ 3R ltzR t{R t|R t}R t~R tR tR tR tR tRR ltR t/ 3R lt]EP                  ! R]EP                  4      EP                  t]EP                  ! R]EP                  4      EP                  tR tR tRR ltR# )a9  
Auxiliary functions for f2py2e.

Copyright 1999 -- 2011 Pearu Peterson all rights reserved.
Copyright 2011 -- present NumPy Developers.
Permission to use, modify, and distribute this software is given under the
terms of the NumPy (BSD style) LICENSE.

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.
N)reduce)__version__cfuncs)errmess
applyrules	debugcapi
dictappendr   gentitlegetargs2getcallprotoargumentgetcallstatementgetfortrannamegetpymethoddef
getrestdocgetusercodegetusercode1getdimensionhasbodyhascallstatement	hascommonhasexternalshasinitvaluehasnotehasresultnoteisallocatableisarrayisarrayofstringsischaracterischaracterarrayischaracter_or_characterarray	iscomplexiscstyledirectiveiscomplexarrayiscomplexfunctioniscomplexfunction_warnisdoubleisdummyroutine
isexternal
isfunctionisfunction_wrapisint1isint1array	isintegerisintent_aux
isintent_cisintent_callbackisintent_copyisintent_dictisintent_hideisintent_inisintent_inoutisintent_inplaceisintent_nothideisintent_outisintent_overwrite	islogicalislogicalfunctionislong_complexislong_doubleislong_doublefunctionislong_longislong_longfunctionismoduleismoduleroutine
isoptional	isprivate
isvariable
isrequired	isroutineisscalarissigned_long_longarrayisstringisstringarrayisstring_or_stringarrayisstringfunctionissubroutineget_f2py_modulenameissubroutine_wrapisthreadsafe
isunsignedisunsigned_charisunsigned_chararrayisunsigned_long_longisunsigned_long_longarrayisunsigned_shortisunsigned_shortarrayl_andl_notl_oroutmessreplaceshow
stripcommathrow_errorisattr_valuegetuseblocksprocess_f2cmap_dictcontainscommoncontainsderivedtypesc                     \         P                  R ^4      '       d"   \        P                  P	                  V 4       R# R# )verboseN)optionsgetsysstdoutwrite)ts   &s/Users/tonyclaw/.openclaw/workspace/skills/math-calculator/venv/lib/python3.14/site-packages/numpy/f2py/auxfuncs.pyr[   r[   ;   s*    {{9a  

 !    c                     R \         9   # )capi)debugoptionsvars   &rm   r   r   @   s    \!!rn   c                 d    R V 9   ;'       d%    V R ,          R8H  ;'       d    \        V 4      '       * # typespec	characterr'   rr   s   &rm   _ischaracterry   D   8      ZK!?  #rn   c                 d    R V 9   ;'       d%    V R ,          R8H  ;'       d    \        V 4      '       * # ru   rx   rr   s   &rm   	_isstringr|   I   rz   rn   c                 2    \        V 4      ;'       d    R V 9  # charselectorry   rr   s   &rm   r   r   N   s    ::s!::rn   c                 H    \        V 4      ;'       d    \        V 4      '       * # Nr   r   rr   s   &rm   r   r   R   s    (-BBgcl2BBrn   c                 >    \        V 4      ;'       d    \        V 4      # r   r   rr   s   &rm   r   r   V   s    (->>'#,>rn   c                 2    \        V 4      ;'       d    R V 9   # r~   r   rr   s   &rm   rK   rK   Z   s    663!66rn   c                 H    \        V 4      ;'       d    \        V 4      '       * # r   rK   r   rr   s   &rm   rI   rI   ^   s    "3'<<,<<rn   c                 >    \        V 4      ;'       d    \        V 4      # r   r   rr   s   &rm   rJ   rJ   b   s    "3'88GCL8rn   c                 N    \        V 4      ;'       d    V R ,          R,          R8H  # )	dimensionz(*))rJ   rr   s   &rm   r   r   f   s&     ??#k"22"6%"??rn   c                 <    R V 9   ;'       d    \        V 4      '       * # r   rx   rr   s   &rm   r   r   l   s    #55jo"55rn   c                 n    \        V 4      ;'       g    \        V 4      ;'       g    \        V 4      '       * # r   )r   rI   r'   rr   s   &rm   rG   rG   p   s'    @@@@CAArn   c                 P    \        V 4      ;'       d    V P                  R 4      R9   # rv   )complexzdouble complexrG   rh   rr   s   &rm   r    r    t   s-    C= @ @77:"??@rn   c                 P    \        V 4      ;'       d    V P                  R 4      R8H  # )rv   logicalr   rr   s   &rm   r9   r9   y   "    C===SWWZ0I==rn   c                 P    \        V 4      ;'       d    V P                  R 4      R8H  # )rv   integerr   rr   s   &rm   r,   r,   }   r   rn   c                 P    \        V 4      ;'       d    V P                  R 4      R8H  # )rv   realr   rr   s   &rm   isrealr      s"    C=::SWWZ0F::rn   c                      V R ,          R,          #   \          d(     T R ,          R,          u #   \          d      R# i ; ii ; i)kindselector*kindNKeyErrorrr   s   &rm   get_kindr      sM    >"3'' 	~&v.. 		s'    A0AA AA  Ac                     V P                  R 4      R8H  ;'       d'    \        V 4      R8H  ;'       d    \        V 4      '       * # rv   r   1)rh   r   r   rr   s   &rm   r*   r*      sB    77:)+ 6 6SMS 6 6)0%56rn   c                 t    \        V 4      '       g   ^ # V P                  R4      R9  d   ^ # \        V 4      R8H  # )    rv   8r   r   rG   rh   r   rr   s   &rm   r>   r>      s2    C==
wwz"88C=Crn   c                 t    \        V 4      '       g   ^ # V P                  R4      R8w  d   ^ # \        V 4      R8H  # )r   rv   r   -1r   rr   s   &rm   rR   rR      1    C==
wwzi'C=D  rn   c                 t    \        V 4      '       g   ^ # V P                  R4      R8w  d   ^ # \        V 4      R8H  # )r   rv   r   -2r   rr   s   &rm   rV   rV      r   rn   c                 t    \        V 4      '       g   ^ # V P                  R4      R8w  d   ^ # \        V 4      R8H  # )r   rv   r   -4r   rr   s   &rm   rQ   rQ      r   rn   c                 t    \        V 4      '       g   ^ # V P                  R4      R8w  d   ^ # \        V 4      R8H  # )r   rv   r   -8r   rr   s   &rm   rT   rT      r   rn   c                 t    \        V 4      '       g   ^ # V P                  R4      R8X  g   ^ # \        V 4      R8H  # )r   rv   r   r   r   rr   s   &rm   r%   r%      s1    C==77:&(C=Crn   c                 t    \        V 4      '       g   ^ # V P                  R4      R8X  g   ^ # \        V 4      R8H  # )r   rv   r   16r   rr   s   &rm   r<   r<      s1    C==77:&(C=D  rn   c                 D    \        V 4      '       g   ^ # \        V 4      R8H  # )r   32)r    r   rr   s   &rm   r;   r;      s    S>>C=D  rn   c                 P    \        V 4      ;'       d    V P                  R 4      R9   # r   )r   rh   rr   s   &rm   r"   r"      s-    3< @ @77:"??@rn   c                 |    \        V 4      ;'       d+    V P                  R 4      R8H  ;'       d    \        V 4      R8H  # r   r   rh   r   rr   s   &rm   r+   r+      s>    3< ! !CGGJ/9< ! !SMS !rn   c                 |    \        V 4      ;'       d+    V P                  R 4      R9   ;'       d    \        V 4      R8H  # )rv   r   r   r   rr   s   &rm   rS   rS      ?    3< " "CGGJ/3II " "SMT!"rn   c                 |    \        V 4      ;'       d+    V P                  R 4      R9   ;'       d    \        V 4      R8H  # )rv   r   r   r   rr   s   &rm   rW   rW      r   rn   c                 |    \        V 4      ;'       d+    V P                  R 4      R9   ;'       d    \        V 4      R8H  # )rv   r   r   r   rr   s   &rm   isunsignedarrayr      r   rn   c                 |    \        V 4      ;'       d+    V P                  R 4      R9   ;'       d    \        V 4      R8H  # )rv   r   r   r   rr   s   &rm   rU   rU      r   rn   c                 |    \        V 4      ;'       d+    V P                  R 4      R9   ;'       d    \        V 4      R8H  # )rv   r   r   r   rr   s   &rm   issigned_chararrayr      ?    3< ! !CGGJ/3II ! !SMS !rn   c                 |    \        V 4      ;'       d+    V P                  R 4      R9   ;'       d    \        V 4      R8H  # )rv   2r   r   rr   s   &rm   issigned_shortarrayr      r   rn   c                 |    \        V 4      ;'       d+    V P                  R 4      R9   ;'       d    \        V 4      R8H  # )rv   4r   r   rr   s   &rm   issigned_arrayr      r   rn   c                 |    \        V 4      ;'       d+    V P                  R 4      R9   ;'       d    \        V 4      R8H  # )rv   r   r   r   rr   s   &rm   rH   rH      r   rn   c                 4    R V 9   ;'       d    RV R ,          9   # )attrspecallocatable rr   s   &rm   r   r     s    AA#j/!AArn   c                 <    R V 9  ;'       g    \        V 4      '       * # r   )rI   rr   s   &rm   	ismutabler     s    3&77(3-88rn   c                     R V 9   # )
modulenamer   routs   &rm   rA   rA     s    4rn   c                 4    R V 9   ;'       d    RV R ,          8H  # )blockmoduler   r   s   &rm   r@   r@     s    d?88x4=88rn   c                 4    R V 9   ;'       d    RV R ,          8H  # )r   functionr   r   s   &rm   r(   r(     s    d?::zT']::rn   c                     \        V 4      '       d   ^ # \        ;'       d$    \        V 4      ;'       d    \        V 4      '       * # r   )r.   	wrapfuncsr(   r'   r   s   &rm   r)   r)     s3    $DDD)DD:d3C/CDrn   c                 4    R V 9   ;'       d    RV R ,          8H  # )r   
subroutiner   r   s   &rm   rM   rM     s    d?<<|tG}<<rn   c                 d    \        V 4      '       d   ^ # \        V 4      ;'       d    \        V 4      # r   )r.   rM   hasassumedshaper   s   &rm   rO   rO   "  s(    $77/$"77rn   c                 ,    R V P                  R. 4      9   # )valuer   rh   rr   s   &rm   r`   r`   '  s    cggj"---rn   c                     V P                  R 4      '       d   R# V R,           FC  pV R,          P                  V/ 4      P                  R. 4       F  pVR8X  g   K  RV R &     R# 	  KE  	  R# )r   Targsvarsr   :Fr   )r   ads   &  rm   r   r   +  sg    xx!""&\\f!!!R(,,["=ACx*.&' > 
 rn   c                 >    \        V 4      ;'       g    \        V 4      # r   )rA   r   r   s   &rm   requiresf90wrapperr   6  s    4 99OD$99rn   c                 >    \        V 4      ;'       g    \        V 4      # r   )r(   rM   r   s   &rm   rF   rF   :  s    d11|D11rn   c                     \        V 4      '       g   ^ # RV 9   d   V R,          pM	V R,          pWR,          9   d   \        V R,          V,          4      # ^ # r   resultnamer   )r(   r9   r   r   s   & rm   r:   r:   >  J    d4NLLfa))rn   c                     \        V 4      '       g   ^ # RV 9   d   V R,          pM	V R,          pWR,          9   d   \        V R,          V,          4      # ^ # r   )r(   r>   r   s   & rm   r?   r?   J  sJ    d4NLL4<?++rn   c                     \        V 4      '       g   ^ # RV 9   d   V R,          pM	V R,          pWR,          9   d   \        V R,          V,          4      # ^ # r   )r(   r<   r   s   & rm   r=   r=   V  sJ    d4NLLT&\!_--rn   c                     \        V 4      '       g   ^ # RV 9   d   V R,          pM	V R,          pWR,          9   d   \        V R,          V,          4      # ^ # r   )r(   r    r   s   & rm   r#   r#   b  r   rn   c                 B    \        V 4      '       d   \        R 4       ^# ^ # )a      **************************************************************
        Warning: code with a function returning complex value
        may not work correctly with your Fortran compiler.
        When using GNU gcc/g77 compilers, codes should work
        correctly for callbacks with:
        f2py -c -DF2PY_CB_RETURNCOMPLEX
    **************************************************************
)r#   r[   r   s   &rm   r$   r$   n  s$     H 	I rn   c                     \        V 4      '       g   ^ # RV 9   d   V R,          pM	V R,          pWR,          9   d   \        V R,          V,          4      # ^ # r   )r(   rI   r   s   & rm   rL   rL   |  sJ    d4NLLVQ((rn   c                 .    R V 9   ;'       d
    V R ,          # )	externalsr   r   s   &rm   r   r     s    $444#44rn   c                 4    R V 9   ;'       d    RV R ,          9   # )f2pyenhancements
threadsafer   r   s   &rm   rP   rP     s'    % 4 44 2334rn   c                 .    R V 9   ;'       d
    V R ,          # )r   r   r   s   &rm   hasvariablesr     s    T>**d6l*rn   c                     R V 9   ;'       d4    RV R ,          9   ;'       d     RV R ,          9  ;'       d    \        V 4      # )r   optionalrequired)r6   rr   s   &rm   rB   rB     sQ    # I .*J"? I .c*o-I I3CC3HIrn   c                 4    R V 9   ;'       d    RV R ,          9   # )r   externalr   rr   s   &rm   r'   r'     s    >>s:!>>rn   c                   a R oRV P                  4       9   dg   \        ;QJ d#    R V R,           4       F  '       g   K   RM	  RM! R V R,           4       4      '       d   \        V3R lV R,           4       4      # R# R# )z	\((.*?)\)r   c              3   ,   "   T F
  pR V9   x  K  	  R# 5i)r   Nr   ).0ss   & rm   	<genexpr>getdimension.<locals>.<genexpr>  s     9A{as   TFc              3   R   <"   T F  p\         P                  ! SV4      x  K  	  R # 5ir   )refindall)r  v
dimpatterns   & rm   r  r	    s     K?a

:q11?s   $'N)keysanynext)rs   r  s   &@rm   r   r     s^    JSXXZ39Z93339Z999K3z?KKK :  rn   c                 H    \        V 4      '       * ;'       d    \        V 4      # r   )rB   r6   rr   s   &rm   rE   rE     s    #88#3C#88rn   c                    a  0 Rmp\         ;QJ d    V 3R lV 4       F  '       g   K   R# 	  R# ! V 3R lV 4       4      # )callstatementc              3   H   <"   T F  qSP                  4       9   x  K  	  R # 5ir   )lower)r  	directive	f2py_lines   & rm   r  $iscstyledirective.<locals>.<genexpr>  s     Jz)IOO--zs   "TF>   pymethoddefr  callprotoargument)r  )r  
directivess   f rm   r!   r!     s1    FJ3JzJ33J3J3JzJJJrn   c                     R V 9  d   ^# RV R ,          9   d   ^ # RV R ,          9   d   ^ # RV R ,          9   d   ^# RV R ,          9   d   ^ # RV R ,          9   d   ^ # RV R ,          9   d   ^ # ^# )intenthideinplaceinoutinoutoutinr   rr   s   &rm   r3   r3     sj    sXCM!s8}H#h-#h-rn   c                     R V 9   ;'       d]    RV R ,          9   ;'       g    RV R ,          9   ;'       d5    RV R ,          9  ;'       d!    RV R ,          9  ;'       d    RV R ,          9  # )r  r#  r$  r!  r  r   r   rr   s   &rm   r4   r4     s    O K KCM!9 "% "%s8}$K K*.c(m*CK K#h-'K K,5S],JLrn   c                 ,    R V P                  R. 4      9   # )r"  r  r   rr   s   &rm   r7   r7         CGGHb)))rn   c                     R V 9   ;'       d\    RV R ,          9   ;'       gH    RV R ,          9   ;'       d4    RV R ,          9  ;'       d     \        \        \        4      ! V 4      '       * # )r  r  r"  r!  )rZ   r4   r5   rr   s   &rm   r2   r2     st    O D D3x=!8 "C "Cc(m# B BCM(A B B.*:;C@@Ern   c                 "    \        V 4      '       * # r   )r2   rr   s   &rm   r6   r6     s    S!!!rn   c                 ,    R V P                  R. 4      9   # )cr  r   rr   s   &rm   r.   r.     s    #''(B'''rn   c                 ,    R V P                  R. 4      9   # )cacher  r   rr   s   &rm   isintent_cacher.    s    cggh+++rn   c                 ,    R V P                  R. 4      9   # )copyr  r   rr   s   &rm   r0   r0     s    SWWXr***rn   c                 ,    R V P                  R. 4      9   # )	overwriter  r   rr   s   &rm   r8   r8         #''(B///rn   c                 ,    R V P                  R. 4      9   # )callbackr  r   rr   s   &rm   r/   r/         2...rn   c                 ,    R V P                  R. 4      9   # )r   r  r   rr   s   &rm   r5   r5     s    "---rn   c                 ,    R V P                  R. 4      9   # )auxr  r   rr   s   &rm   r-   r-     r'  rn   c                 ,    R V P                  R. 4      9   # )aligned4r  r   rr   s   &rm   isintent_aligned4r<    r6  rn   c                 ,    R V P                  R. 4      9   # )aligned8r  r   rr   s   &rm   isintent_aligned8r?    r6  rn   c                 ,    R V P                  R. 4      9   # )	aligned16r  r   rr   s   &rm   isintent_aligned16rB    r3  rn   	INTENT_ININTENT_INOUT
INTENT_OUTINTENT_HIDEINTENT_CACHEINTENT_COPTIONALINTENT_INPLACEINTENT_ALIGNED4INTENT_ALIGNED8INTENT_ALIGNED16c                 4    R V 9   ;'       d    RV R ,          9   # )r   privater   rr   s   &rm   rC   rC     s    ==c*o!==rn   c                 j    \        V 4      ^8X  d!   RV 9   d   V R,          ^ ,          R9   d   RpV# RpV# )   r   FT)publicrO  len)rs   is_vars   & rm   rD   rD     s>    
3x1}s*
OA"77 M Mrn   c                     R V 9   # )=r   rr   s   &rm   r   r     s    #:rn   c                 N    \        V 4      '       g   ^ # V R,          ^ ,          R9   # )r   rW  )"')r   rr   s   &rm   hasinitvalueasstringr[    s#    s8A;*$$rn   c                     R V 9   # )noter   rr   s   &rm   r   r     s    S=rn   c                     \        V 4      '       g   ^ # RV 9   d   V R,          pM	V R,          pWR,          9   d   \        V R,          V,          4      # ^ # r   )r(   r   r   s   & rm   r   r   "  sJ    d4NLLtF|A''rn   c                     R V 9   # )commonr   r   s   &rm   r   r   .  s    trn   c                     \        V 4      '       d   ^# \        V 4      '       d%   V R,           F  p\        V4      '       g   K   ^# 	  ^ # rQ  body)r   r   rc   r   bs   & rm   rc   rc   2  s:    t}}fAa    rn   c                 4    R V 9   ;'       d    V R ,          R8H  # )r   typer   r   s   &rm   hasderivedtypesrh  <  s    tO88g&!88rn   c                     \        V 4      '       d   ^# \        V 4      '       d%   V R,           F  p\        V4      '       g   K   ^# 	  ^ # rb  )rh  r   rd  s   & rm   rd   rd   @  s<    tt}}fAq!!  rn   c                     \        V 4      '       d   ^# \        V 4      '       g   ^ # V R,           F  p\        V4      '       g   K   ^# 	  ^ # rb  )r@   r   containsmodule)r   re  s   & rm   rk  rk  J  s=    5>>6]]!  rn   c                     R V 9   # )rc  r   r   s   &rm   r   r   U  s    T>rn   c                     \        V 4      R J# r   )r   r   s   &rm   r   r   Y  s    D!--rn   c                     ^# )rQ  r   rr   s   &rm   istruero  ]      rn   c                     ^ # r   r   rr   s   &rm   isfalserr  a  rp  rn   c                       ] tR tRtRtR# )	F2PYErrorie  r   N)__name__
__module____qualname____firstlineno____static_attributes__r   rn   rm   rt  rt  e  s    rn   rt  c                   ,   a  ] tR tRt o R tR tRtV tR# )r_   ii  c                    Wn         R # r   mess)selfr}  s   &&rm   __init__throw_error.__init__k  s    	rn   c                >    R V RV P                    R2p\        V4      h)z


  var = z
  Message: 
)r}  rt  )r~  rs   r}  s   && rm   __call__throw_error.__call__n  s$    cU-		{"=orn   r|  N)ru  rv  rw  rx  r  r  ry  __classdictcell__)__classdict__s   @rm   r_   r_   i  s      rn   c                      R . r!\        \        V 4      4       F&  pRWV3,          pVP                  RV,          4       K(  	  \        V RRP	                  V4       24      # )lambda v%s,f%d=f[%d]f%d(v)r   z and rangerT  appendevaljoinfl1l2is   *   rm   rX   rX   s  s[    3q6]raj(
		(a.!  2$aR()*++rn   c                      R . r!\        \        V 4      4       F&  pRWV3,          pVP                  RV,          4       K(  	  \        V RRP	                  V4       24      # )r  r  r  r   z or r  r  s   *   rm   rZ   rZ   {  sZ    3q6]raj(
		(a.!  2$aB()**rn   c                     \        R 4      # )zlambda v,f=f:not f(v))r  )r  s   &rm   rY   rY     s    '((rn   c                 N     V R ,          R,          R8H  #   \          d     ^ # i ; i)r   fortranname r   r   s   &rm   r&   r&     s/    &'6"<< s    $$c                      V R ,          R,          pVR8X  d   \         hV'       g   \        RV R ,           R24       \         h V#   \          d    T R,          p T# i ; i)r   r  r  zFailed to use fortranname from r  r   )r   r   )r   r   s   & rm   r   r     so    &'62:N5d;M6N5OrRSN 
 K  F|Ks   $A A AAc                 j    V R ,          P                  V4      pT'       g   R# T^ 8  d   \        T\        4      '       d   R# \        T\        4      '       d   T\        T4      8  d   R# YC,          pTR,          R8X  d   T'       d7   RT,           R,           \        T4      ,           R,           TR,          ,           pM	TR,          pTRR R8X  d6   T'       d&   TRR R,           \        T4      ,           R	,           pT# TRR p T# \        T R
\        T4       R24       T#   \         d     R# i ; i)r   N:N   Nz'''z
	/* start z multiline (z) */
:r  NNz
	/* end multiline (z)*/z( multiline block should end with `'''`: r  )rh   r   
isinstancestrlistrT  reprr   )r   	blocknamecommentcounterrs   &&&& rm   getmultilineblockr    s*   #$((3 {z!S))!Tc!fJu~	)!%g/19:<=bEBA "ARS6U?crF55WEM
 H crF H yk!I$q'RTUVH/  s   D# #D21D2c                     \        V R 4      # )r  r  r   s   &rm   r   r     s    T?33rn   c                 @   \        V R ^ R7      pV'       d   V# \        V 4      '       d   \        R4       R# ^RIHp . . rT\        \        \        \        4      4      ! V 4      '       d   VP                  RR.4       V R,           F  pV R,          V,          p\        V4      '       d   K&  Wa9   d   W,          R	,           pMV! V4      p\        \        \        \        \        4      4      ! V4      '       d   M,\        V4      '       d   M\!        V4      '       g
   VR
,           p\        V4      '       g#   \#        V4      '       g   \%        V4      '       d   VP'                  R4       VP'                  V4       K  	  RP)                  WE,           4      p	V	'       g   Rp	V	# )r  )r  z<warning: callstatement is defined without callprotoargument
N)getctypezchar*size_tr   r   _typedefr   ,void)r  r   r[   	capi_mapsr  rX   rL   rY   r)   extendr/   r.   rZ   rG   r    rI   r`   r   rJ   r  r  )
r   cb_mapr  r  	arg_types
arg_types2nrs   ctype
proto_argss
   &&        rm   r   r     sE   $ 3Q?AK	M#zu_56t<<'8,-&\\6l1oS!!;I
*ESMEZh	!:;C@@#!#&&$S))!#&&!!(+% ( )01J
rn   c                     \        V R 4      # )usercoder  r   s   &rm   r   r     s    T:..rn   c                     \        V R ^R7      # )r  )r  r  r   s   &rm   r   r     s    T:q99rn   c                     \        V R 4      # )r  r  r   s   &rm   r   r     s    T=11rn   c                     . . r!R V 9   dh   V R ,          pRV 9   dO   V R,           F  pW29   g   K  VP                  V4       K  	  V F  pW19  g   K  VP                  V4       K  	  W!3# V R ,          pW!3# )r   sortvars)r  )r   sortargsr   r   s   &   rm   getargsr    s    d~F|*%%9OOA& & $OOA& 
 > F|H>rn   c                    . V P                  R . 4      r!V R,          P                  4        Uu. uF.  p\        V R,          V,          4      '       g   K$  W29  g   K,  VNK0  	  ppWB,           pRV 9   dO   V R,           F  pW29   g   K  VP                  V4       K  	  V F  pW19  g   K  VP                  V4       K  	  W!3# W@R ,          ,           pW!3# u upi )r   r   r  )rh   r  r-   r  )r   r  r   r   auxvarss   &    rm   r
   r
     s    &"-dv,++- "-Qd6l1o1Nq= q-G ">DTj!!Ay" " A " 
 > &\)>"s   !CCCc                     R V 9  d   R# RpV R,          R8X  d   V R,          V R,          3pV R ,          P                  VR4      # )f2pymultilinesNr   zpython moduler   r   )r   ks   & rm   r   r     sI    t#AG}'M4<' !%%a..rn   c                 v    ^P\        V 4      ,
          ^,
          ^,          pRVR,           RV  RVR,           R2# )P   z/*r    z*/rS  )r   lns   & rm   r	   r	     s<    
s4y.1
	"BSz4&"s(2..rn   c                 ^    \        V \        4      '       d   \        \        3R  lV . 4      # V .# )c                     W! V4      ,           # r   r   )xyr  s   &&&rm   <lambda>flatlist.<locals>.<lambda>  s    q1Q4xrn   )r  r  r   flatlist)lsts   &rm   r  r    s(    #tX7bAA5Lrn   c                 <    V '       d   V R,          R8X  d   V RR # V # )rQ  r  Nr   r   )r  s   &rm   r^   r^   #  s    QrUc\"vHrn   c           
      l   \        V\        4      '       d   V Uu. uF  p\        WV4      NK  	  up# \        V \        4      '       d   V  Uu. uF  p\        W1V4      NK  	  up# ^\        VP                  4       4      ,           F  pVR8X  d   K  RV9   d   WAR,          9   d   VR,          V,          pMTp\        W,          \        4      '       d7   V P                  RV R2VP	                  \        W,          4      4      4      p K  V P                  RV R2W,          4      p K  	  V # u upi u upi )   separatorsfor#)r  r  r\   r  r  r  )r  r   
defaultsep_mr  seps   &&&   rm   r\   r\   )  s    !T789q,q99#t589Srz*S99affhaA?);$;O$Q'CCadD!!++!Ah!$(@AC++!Ah-C   J :9s   D,D1c                 R   \        V\        4      '       d   V F  p\        W4      p K  	  V # VP                  4        EFe  pV^ ,          R8X  d   K  W09   EdA   \        W,          \        4      '       d   W,          .W&   \        W,          \        4      '       dU   \        W,          \        4      '       d   W,          W,          ,           W&   K  W,          P                  W,          4       K  \        W,          \        4      '       d   \        W,          \        4      '       dl   VR8X  dH   W,          P                  4        F*  pW@V,          9  g   K  W,          V,          W,          V&   K,  	  EK8  \        W,          W,          4      W&   EKU  EKX  EK[  W,          W&   EKh  	  V # )r   _r  )r  r  r   r  r  r  dict)rdarr   r  k1s   &&   rm   r   r   <  s$   "dAB"B 	WWYQ43;7"%%%"%&&beT**EBEMBEELL'BE4((beT**O+"$%**,B!A,.E"Ib	 #/ !+25"% 8 + ) EBE) * Irn   c           	         / p\        V \        4      '       d-   V  F$  p\        WAV4      p\        W54      pR V9   g   K#   V# 	  V# RV 9   d   V R,          ! V4      '       g   V# RV 9   d:   \        RV R,          /W4      pRV9   d   \        P
                  ! VR,          4       V P                  4        EF  pVR8X  d   W,          W7&   K  \        W,          \        4      '       d   \        W,          V4      W7&   EM\        W,          \        4      '       dH   . W7&   W,           F5  p\        Wx/W4      p	Wy9   g   K  W7,          P                  W,          4       K7  	  EMV^ ,          R8X  d   K  \        W,          \        4      '       EdM   . W7&   W,          P                  4        EF,  p
\        V
\        P                  4      '       g   K&  V
! V4      '       g   K6  \        W,          V
,          \        4      '       do   W,          V
,           FY  p\        V\        4      '       d!   \        RV/W4      pVP                  RR4      pW7,          P                  \        W4      4       K[  	  K  W,          V
,          p\        V\        4      '       d!   \        RV/V4      pVP                  RR4      pW7,          P                  \        W4      4       EK/  	  M\        R\        W,          4       R	24       \        W7,          \        4      '       g   EKb  \!        W7,          4      ^8X  d   W7,          ^ ,          W7&   W7,          . 8X  g   EK  W7 EK  	  V# )
_break_checkneedneedsr  r  	supertextr  zapplyrules: ignoring rule z.
)r  r  r   r   r   append_needsr  r  r\   r  r  typesFunctionTyperh   r   r  rT  )rulesr   rs   retr  rrresr  r  r  r  s   &&&        rm   r   r   Y  s   
C%AA#&BS%C2~
 
 
5%/#"6"6
'5=11:c>G-ZZ\XCFeh$$UXq)CF$''CFXX/7FMM"%(  qTS[$''CFhmmob%"4"455"S''!%(2,55!&"A)!T22&0+q1A1&J$'GGK$<FMM'!-8	 ". "HRL%a..",k1-=q"AC #R 8Agam4 & 0eh0@DEcfd##36{av|FI J Jrn   z%\s*python\s*module\s*(?P<name>[\w_]+)z4\s*python\s*module\s*(?P<name>[\w_]*?__user__[\w_]*)c                     R p\        V 4      ;_uu_ 4       pV F<  p\        V4      pV'       g   K  \        V4      '       d   K+  VP                  R4      p M	  R R R 4       V#   + '       g   i     T# ; i)Nr   )open_f2py_module_name_match_f2py_user_module_name_matchgroup)sourcer   r  linems   &    rm   rN   rN     sd    D	fD'-Aq/55wwv  
 K 
 Ks   A#(A##A4	c           	         . pV R ,           Fs  pVR ,           Fc  pVP                  R4      '       g   K  TP                  VP                  R4      P                  4        Uu. uF  pRV9  g   K  VNK  	  up4       Ke  	  Ku  	  V# u upi )rc  use__)rh   r  r  )pymodall_usesinnermodblockr  s   &    rm   ra   ra     s{    HvfH||E""HLL,?,D,D,F X,Fq$VW-,F XY &  O !Ys    	B.Bc                   . p/ pVP                  4        FI  w  rgVP                  4        UU	u/ uF  w  rVP                  4       V	bK  	  p
pp	WVP                  4       &   KK  	  VP                  4        F  w  rgW`9  d   / W&   VP                  4        F  w  rW9   dr   WV,          9   d*   \        RV: RV: RW,          V,          : RV	: R2	4       WV,          V&   V'       d   \        RV RV RV	 R	24       VP                  V	4       K|  V'       g   K  \	        R
V: RV: RV	: RV	: R\        VP                  4       4      : R24       K  	  K  	  W3# u up	pi )ar  
Update the Fortran-to-C type mapping dictionary with new mappings and
return a list of successfully mapped C types.

This function integrates a new mapping dictionary into an existing
Fortran-to-C type mapping dictionary. It ensures that all keys are in
lowercase and validates new entries against a given C-to-Python mapping
dictionary. Redefinitions and invalid entries are reported with a warning.

Parameters
----------
f2cmap_all : dict
    The existing Fortran-to-C type mapping dictionary that will be updated.
    It should be a dictionary of dictionaries where the main keys represent
    Fortran types and the nested dictionaries map Fortran type specifiers
    to corresponding C types.

new_map : dict
    A dictionary containing new type mappings to be added to `f2cmap_all`.
    The structure should be similar to `f2cmap_all`, with keys representing
    Fortran types and values being dictionaries of type specifiers and their
    C type equivalents.

c2py_map : dict
    A dictionary used for validating the C types in `new_map`. It maps C
    types to corresponding Python types and is used to ensure that the C
    types specified in `new_map` are valid.

verbose : boolean
    A flag used to provide information about the types mapped

Returns
-------
tuple of (dict, list)
    The updated Fortran-to-C type mapping dictionary and a list of
    successfully mapped C types.
z	Warning: redefinition of {'z':{'z':'z'->'z'}}
z
	Mapping "z(kind=z)" to "z"
z	Ignoring map {'z'}}: 'z' must be in r  )itemsr  r[   r  r   r  r  )
f2cmap_allnew_mapc2py_maprf   f2cmap_mappednew_map_lowerr  d1r  v1d1_lowers   &&&&       rm   rb   rb     s.   L MM13<vrBHHJN<#+aggi  ! $$&JMhhjFB~A&b*-"3"3R9 %'1b!k!F2$gbTFG$$R("b"d8==?&;= !	 '* $$1 =s   E)rQ  r   )r  )F)__doc__pprintr  ri   r  	functoolsr   r  r   r   r   __all__versionf2py_versionr]   rg   rq   r   r[   r   ry   r|   r   r   r   rK   rI   rJ   r   r   rG   r    r9   r,   r   r   r*   r>   rR   rV   rQ   rT   r%   r<   r;   r"   r+   rS   rW   r   rU   r   r   r   rH   r   r   rA   r@   r(   r)   rM   rO   r`   r   r   rF   r:   r?   r=   r#   r$   rL   r   rP   r   rB   r'   r   rE   r!   r3   r4   r7   r2   r6   r.   r.  r0   r8   r/   r5   r-   r<  r?  rB  r1   rC   rD   r   r[  r   r   r   rc   rh  rd   rk  r   r   ro  rr  	Exceptionrt  r_   rX   rZ   rY   r&   r   r  r   r   r   r   r   r  r
   r   r	   r  r^   r\   r   r   compileImatchr  r  rN   ra   rb   r   rn   rm   <module>r     s  	  	 
   ! +-68B&(:  ' )5 7D 	 #	 %.	 0B	 DO	
 
 #
 %.
 0?   !3  & (G  %  * ,D  ! #/ 1=    "/ 1< >L  & (7 9H  # %5 7I  ' )= ?J  * ,;  !  +!  -B!" #" "#" $0#" 2=#" ?K#$ %$ %$  *%$ ,E%& '&  '& ";'& =O'( )( *)( ,?)( AO)* +* $+* &<+, -, 8-, :L-. /. %/. './. 06/. 8A/. CL/0 10 10 (10 *810 :H12 32 ,32 .D3: "" }}
	
"

;C?7=9@6B@
>>;6
 !!!! !!@
!
"
"
"
"
!
!
!
!
B9 9;E=8
.:2					54
+I
?L9K
$L*E"(,+0/.*//0 k>>|]MZZ!#3"$5"$5#%7>%	9.		 	 ,+)
:4 ') #L/:2 "//
&:   5p **%M%'TT++05 !zz +=>@dd DDIE 
B%rn   