+
    ei(i  c                   s   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                 s    \         P                  R ^4      '       d"   \        P                  P	                  V 4       R# R# )verboseN)optionsgetsysZstdoutZwrite)Zt   &:/usr/lib64/python3.14/site-packages/numpy/f2py/auxfuncs.pyrY   rY   ;   s*    {{9a  

 !    c                 s    R \         9   # )Zcapi)debugoptionsvarrg   rh   r   r   @   s    \!!ri   c                 d    R V 9   ;'       d%    V R ,          R8H  ;'       d    \        V 4      '       * # typespecZ	characterr%   rk   rg   rh   _ischaracterrq   D   8      ZK!?  #ri   c                 rm   rn   rp   rk   rg   rh   	_isstringrs   I   rr   ri   c                 s2    \        V 4      ;'       d    R V 9  # Zcharselectorrq   rk   rg   rh   r   r   N   s    ::s!::ri   c                 H    \        V 4      ;'       d    \        V 4      '       * # Nr   r   rk   rg   rh   r   r   R   s    (-BBgcl2BBri   c                 >    \        V 4      ;'       d    \        V 4      # rw   rx   rk   rg   rh   r   r   V   s    (->>'#,>ri   c                 s2    \        V 4      ;'       d    R V 9   # rt   ru   rk   rg   rh   rI   rI   Z   s    663!66ri   c                 rv   rw   rI   r   rk   rg   rh   rG   rG   ^   s    "3'<<,<<ri   c                 ry   rw   rz   rk   rg   rh   rH   rH   b   s    "3'88GCL8ri   c                 sN    \        V 4      ;'       d    V R ,          R,          R8H  # )	dimensionz(*))rH   rk   rg   rh   r   r   f   s&     ??#k"22"6%"??ri   c                 s<    R V 9   ;'       d    \        V 4      '       * # r{   rp   rk   rg   rh   r   r   l   s    #55jo"55ri   c                 sn    \        V 4      ;'       g    \        V 4      ;'       g    \        V 4      '       * # rw   )r   rG   r%   rk   rg   rh   rE   rE   p   s'    @@@@CAAri   c                 P    \        V 4      ;'       d    V P                  R 4      R9   # ro   )Zcomplexzdouble complexrE   re   rk   rg   rh   r   r   t   s-    C= @ @77:"??@ri   c                 P    \        V 4      ;'       d    V P                  R 4      R8H  # )ro   logicalr   rk   rg   rh   r7   r7   y   "    C===SWWZ0I==ri   c                 r   )ro   integerr   rk   rg   rh   r*   r*   }   r   ri   c                 r   )ro   realr   rk   rg   rh   isrealr      s"    C=::SWWZ0F::ri   c                 s     V R ,          R,          #   \          d(     T R ,          R,          u #   \          d      R# i ; ii ; i)Zkindselector*ZkindNKeyErrorrk   rg   rh   get_kindr      sM    >"3'' 	~&v.. 		s'    A0AA AA  Ac                 s    V P                  R 4      R8H  ;'       d'    \        V 4      R8H  ;'       d    \        V 4      '       * # ro   r   1)re   r   r   rk   rg   rh   r(   r(      sB    77:)+ 6 6SMS 6 6)0%56ri   c                 st    \        V 4      '       g   ^ # V P                  R4      R9  d   ^ # \        V 4      R8H  # )    ro   8r   r   rE   re   r   rk   rg   rh   r<   r<      s2    C==
wwz"88C=Cri   c                 t    \        V 4      '       g   ^ # V P                  R4      R8w  d   ^ # \        V 4      R8H  # )r   ro   r   -1r   rk   rg   rh   rP   rP      1    C==
wwzi'C=D  ri   c                 r   )r   ro   r   -2r   rk   rg   rh   rT   rT      r   ri   c                 r   )r   ro   r   -4r   rk   rg   rh   rO   rO      r   ri   c                 r   )r   ro   r   -8r   rk   rg   rh   rR   rR      r   ri   c                 t    \        V 4      '       g   ^ # V P                  R4      R8X  g   ^ # \        V 4      R8H  # )r   ro   r   r   r   rk   rg   rh   r#   r#      s1    C==77:&(C=Cri   c                 r   )r   ro   r   Z16r   rk   rg   rh   r:   r:      s1    C==77:&(C=D  ri   c                 sD    \        V 4      '       g   ^ # \        V 4      R8H  # )r   Z32)r   r   rk   rg   rh   r9   r9      s    S>>C=D  ri   c                 r~   r   )r   re   rk   rg   rh   r    r       s-    3< @ @77:"??@ri   c                 s|    \        V 4      ;'       d+    V P                  R 4      R8H  ;'       d    \        V 4      R8H  # r   r   re   r   rk   rg   rh   r)   r)      s>    3< ! !CGGJ/9< ! !SMS !ri   c                 |    \        V 4      ;'       d+    V P                  R 4      R9   ;'       d    \        V 4      R8H  # )ro   r   r   r   rk   rg   rh   rQ   rQ      ?    3< " "CGGJ/3II " "SMT!"ri   c                 r   )ro   r   r   r   rk   rg   rh   rU   rU      r   ri   c                 r   )ro   r   r   r   rk   rg   rh   isunsignedarrayr      r   ri   c                 r   )ro   r   r   r   rk   rg   rh   rS   rS      r   ri   c                 r   )ro   r   r   r   rk   rg   rh   issigned_chararrayr      ?    3< ! !CGGJ/3II ! !SMS !ri   c                 r   )ro   Z2r   r   rk   rg   rh   issigned_shortarrayr      r   ri   c                 r   )ro   Z4r   r   rk   rg   rh   issigned_arrayr      r   ri   c                 r   )ro   r   r   r   rk   rg   rh   rF   rF      r   ri   c                 4    R V 9   ;'       d    RV R ,          9   # )attrspecZallocatable rk   rg   rh   r   r     s    AA#j/!AAri   c                 s<    R V 9  ;'       g    \        V 4      '       * # r}   )rG   rk   rg   rh   	ismutabler     s    3&77(3-88ri   c                     R V 9   # )Z
modulenamer   routrg   rh   r?   r?     s    4ri   c                 4    R V 9   ;'       d    RV R ,          8H  # )blockZmoduler   r   rg   rh   r>   r>     s    d?88x4=88ri   c                 r   )r   Zfunctionr   r   rg   rh   r&   r&     s    d?::zT']::ri   c                 s    \        V 4      '       d   ^ # \        ;'       d$    \        V 4      ;'       d    \        V 4      '       * # r   )r,   	wrapfuncsr&   r%   r   rg   rh   r'   r'     s3    $DDD)DD:d3C/CDri   c                 r   )r   Z
subroutiner   r   rg   rh   rK   rK     s    d?<<|tG}<<ri   c                 sd    \        V 4      '       d   ^ # \        V 4      ;'       d    \        V 4      # r   )r,   rK   hasassumedshaper   rg   rh   rM   rM   "  s(    $77/$"77ri   c                 ,    R V P                  R. 4      9   # )Zvaluer   re   rk   rg   rh   r^   r^   '  s    cggj"---ri   c                 s    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   &  rh   r   r   +  sg    xx!""&\\f!!!R(,,["=ACx*.&' > 
 ri   c                 >    \        V 4      ;'       g    \        V 4      # rw   )r?   r   r   rg   rh   requiresf90wrapperr   6  s    4 99OD$99ri   c                 r   rw   )r&   rK   r   rg   rh   rD   rD   :  s    d11|D11ri   c                     \        V 4      '       g   ^ # RV 9   d   V R,          pM	V R,          pWR,          9   d   \        V R,          V,          4      # ^ # r   Zresultnamer   )r&   r7   r   r      & rh   r8   r8   >  J    d4NLLfa))ri   c                 r   r   )r&   r<   r   r   rh   r=   r=   J  sJ    d4NLL4<?++ri   c                 r   r   )r&   r:   r   r   rh   r;   r;   V  sJ    d4NLLT&\!_--ri   c                 r   r   )r&   r   r   r   rh   r!   r!   b  r   ri   c                 sB    \        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!   rY   r   rg   rh   r"   r"   n  s$     H 	I ri   c                 r   r   )r&   rG   r   r   rh   rJ   rJ   |  sJ    d4NLLVQ((ri   c                 .    R V 9   ;'       d
    V R ,          # )Z	externalsr   r   rg   rh   r   r     s    $444#44ri   c                 r   )f2pyenhancementsZ
threadsafer   r   rg   rh   rN   rN     s'    % 4 44 2334ri   c                 r   )r   r   r   rg   rh   hasvariablesr     s    T>**d6l*ri   c                 s    R V 9   ;'       d4    RV R ,          9   ;'       d     RV R ,          9  ;'       d    \        V 4      # )r   ZoptionalZrequired)r4   rk   rg   rh   r@   r@     sQ    # I .*J"? I .c*o-I I3CC3HIri   c                 r   )r   Zexternalr   rk   rg   rh   r%   r%     s    >>s:!>>ri   c                 s  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   s,   "   T F
  pR V9   x  K  	  R# 5i)r{   Nr   ).0sr   rh   	<genexpr>getdimension.<locals>.<genexpr>  s     9A{as   TFc              3   sR   <"   T F  p\         P                  ! SV4      x  K  	  R # 5irw   )reZfindall)r   Zv
dimpattern   & rh   r   r     s     K?a

:q11?s   $'N)keysanyZnext)rl   r   s   &@rh   r   r     s^    JSXXZ39Z93339Z999K3z?KKK :  ri   c                 sH    \        V 4      '       * ;'       d    \        V 4      # rw   )r@   r4   rk   rg   rh   rC   rC     s    #88#3C#88ri   c                 s   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   sH   <"   T F  qSP                  4       9   x  K  	  R # 5irw   )lower)r   Z	directive	f2py_liner   rh   r   Z$iscstyledirective.<locals>.<genexpr>  s     Jz)IOO--zs   "TF>   pymethoddefr   callprotoargument)r   )r   Z
directivess   f rh   r   r     s1    FJ3JzJ33J3J3JzJJJri   c                 s    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   rk   rg   rh   r1   r1     sj    sXCM!s8}H#h-#h-ri   c                 s    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   rk   rg   rh   r2   r2     s    O K KCM!9 "% "%s8}$K K*.c(m*CK K#h-'K K,5S],JLri   c                 r   )r   r   r   rk   rg   rh   r5   r5         CGGHb)))ri   c                 s    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   )rX   r2   r3   rk   rg   rh   r0   r0     st    O D D3x=!8 "C "Cc(m# B BCM(A B B.*:;C@@Eri   c                 s"    \        V 4      '       * # rw   )r0   rk   rg   rh   r4   r4     s    S!!!ri   c                 r   )Zcr   r   rk   rg   rh   r,   r,     s    #''(B'''ri   c                 r   )Zcacher   r   rk   rg   rh   isintent_cacher     s    cggh+++ri   c                 r   )Zcopyr   r   rk   rg   rh   r.   r.     s    SWWXr***ri   c                 r   )Z	overwriter   r   rk   rg   rh   r6   r6         #''(B///ri   c                 r   )Zcallbackr   r   rk   rg   rh   r-   r-         2...ri   c                 r   )r   r   r   rk   rg   rh   r3   r3     s    "---ri   c                 r   )Zauxr   r   rk   rg   rh   r+   r+     r   ri   c                 r   )Zaligned4r   r   rk   rg   rh   isintent_aligned4r     r   ri   c                 r   )Zaligned8r   r   rk   rg   rh   isintent_aligned8r     r   ri   c                 r   )Z	aligned16r   r   rk   rg   rh   isintent_aligned16r     r   ri   Z	INTENT_INZINTENT_INOUTZ
INTENT_OUTZINTENT_HIDEZINTENT_CACHEZINTENT_CZOPTIONALZINTENT_INPLACEZINTENT_ALIGNED4ZINTENT_ALIGNED8ZINTENT_ALIGNED16c                 r   )r   privater   rk   rg   rh   rA   rA     s    ==c*o!==ri   c                 sj    \        V 4      ^8X  d!   RV 9   d   V R,          ^ ,          R9   d   RpV# RpV# )   r   FT)Zpublicr   len)rl   Zis_varr   rh   rB   rB     s>    
3x1}s*
OA"77 M Mri   c                 r   )=r   rk   rg   rh   r   r     s    #:ri   c                 sN    \        V 4      '       g   ^ # V R,          ^ ,          R9   # )r   r   )Z"Z')r   rk   rg   rh   hasinitvalueasstringr     s#    s8A;*$$ri   c                 r   )Znoter   rk   rg   rh   r   r     s    S=ri   c                 r   r   )r&   r   r   r   rh   r   r   "  sJ    d4NLLtF|A''ri   c                 r   )Zcommonr   r   rg   rh   r   r   .  s    tri   c                 s    \        V 4      '       d   ^# \        V 4      '       d%   V R,           F  p\        V4      '       g   K   ^# 	  ^ # r   body)r   r   ra   r   br   rh   ra   ra   2  s:    t}}fAa    ri   c                 s4    R V 9   ;'       d    V R ,          R8H  # )r   Ztyper   r   rg   rh   hasderivedtypesr   <  s    tO88g&!88ri   c                 s    \        V 4      '       d   ^# \        V 4      '       d%   V R,           F  p\        V4      '       g   K   ^# 	  ^ # r   )r   r   r   r   rh   rb   rb   @  s<    tt}}fAq!!  ri   c                 s    \        V 4      '       d   ^# \        V 4      '       g   ^ # V R,           F  p\        V4      '       g   K   ^# 	  ^ # r   )r>   r   containsmodule)r   r   r   rh   r   r   J  s=    5>>6]]!  ri   c                 r   )r   r   r   rg   rh   r   r   U  s    T>ri   c                 s    \        V 4      R J# rw   )r
   r   rg   rh   r   r   Y  s    D!--ri   c                 s    ^# )r   r   rk   rg   rh   istruer   ]      ri   c                 s    ^ # r   r   rk   rg   rh   isfalser   a  r   ri   c                   s    ] tR tRtRtR# )	F2PYErrorie  r   N)__name__
__module____qualname____firstlineno____static_attributes__r   ri   rh   r   r   e  s    ri   r   c                   s,   a  ] tR tRt o R tR tRtV tR# )r]   ii  c                s    Wn         R # rw   mess)selfr   s   &&rh   __init__Zthrow_error.__init__k  s    	ri   c                s>    R V RV P                    R2p\        V4      h)z


  var = z
  Message: 
)r   r   )r   rl   r   s   && rh   __call__Zthrow_error.__call__n  s$    cU-		{"=ori   r   N)r   r   r   r   r   r   r   Z__classdictcell__)Z__classdict__s   @rh   r]   r]   i  s      ri   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 Zranger   appendevaljoinfZl1Zl2i   *   rh   rV   rV   s  s[    3q6]raj(
		(a.!  2$aR()*++ri   c                  r   )r   r   r   r   z or r   r   r   rh   rX   rX   {  sZ    3q6]raj(
		(a.!  2$aB()**ri   c                 s    \        R 4      # )zlambda v,f=f:not f(v))r   )r   rg   rh   rW   rW     s    '((ri   c                 sN     V R ,          R,          R8H  #   \          d     ^ # i ; i)r   fortranname r   r   rg   rh   r$   r$     s/    &'6"<< s    $$c                 s     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   r   rh   r   r     so    &'62:N5d;M6N5OrRSN 
 K  F|Ks   $A A AAc                 sj    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   i)re   r   
isinstancestrlistr   reprr   )r   Z	blocknamecommentcounterrs   &&&& rh   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   rg   rh   r
   r
     s    T?33ri   c                 s@   \        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*Zsize_tr   r   Z_typedefr   ,Zvoid)r  r   rY   Z	capi_mapsr  rV   rJ   rW   r'   extendr-   r,   rX   rE   r   rG   r^   r   rH   r   r   )
r   Zcb_mapr
  r  Z	arg_typesZ
arg_types2Znrl   ZctypeZ
proto_argss
   &&        rh   r	   r	     sE   $ 3Q?AK	M#zu_56t<<'8,-&\\6l1oS!!;I
*ESMEZh	!:;C@@#!#&&$S))!#&&!!(+% ( )01J
ri   c                 r  )usercoder  r   rg   rh   r   r     s    T:..ri   c                 s    \        V R ^R7      # )r  )r	  r  r   rg   rh   r   r     s    T:q99ri   c                 r  )r   r  r   rg   rh   r   r     s    T=11ri   c                 s    . . 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   &   rh   getargsr    s    d~F|*%%9OOA& & $OOA& 
 > F|H>ri   c                 s   . 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  )re   r   r+   r   )r   r  r   r   Zauxvars   &    rh   r   r     s    &"-dv,++- "-Qd6l1o1Nq= q-G ">DTj!!Ay" " A " 
 > &\)>"s   !CCCc                 s    R V 9  d   R# RpV R,          R8X  d   V R,          V R,          3pV R ,          P                  VR4      # )Zf2pymultilinesNr   zpython moduler   r   )r   kr   rh   r   r     sI    t#AG}'M4<' !%%a..ri   c                 sv    ^P\        V 4      ,
          ^,
          ^,          pRVR,           RV  RVR,           R2# )iP   z/*r   Z z*/r   )r   Zlnr   rh   r   r     s<    
s4y.1
	"BSz4&"s(2..ri   c                 s^    \        V \        4      '       d   \        \        3R  lV . 4      # V .# )c                 s    W! V4      ,           # rw   r   )xZyr   s   &&&rh   Z<lambda>Zflatlist.<locals>.<lambda>  s    q1Q4xri   )r  r  r    flatlist)Zlstrg   rh   r  r    s(    #tX7bAA5Lri   c                 s<    V '       d   V R,          R8X  d   V RR # V # )r   r  Nr|   r   )r   rg   rh   r\   r\   #  s    QrUc\"vHri   c           
      sl   \        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 )i   separatorsforZ#)r  r  rZ   r   r   r  )r  r   Z
defaultsepZ_mr  Zseps   &&&   rh   rZ   rZ   )  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                 sR   \        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)Zrdarr   r  k1s   &&   rh   r   r   <  s$   "dAB"B 	WWYQ43;7"%%%"%&&beT**EBEMBEELL'BE4((beT**O+"$%**,B!A,.E"Ib	 #/ !+25"% 8 + ) EBE) * Iri   c           	      s   / 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# )
Z_breakZ_checkZneedZneedsr  r  Z	supertextr  zapplyrules: ignoring rule z.
)r  r  r   r   r   Zappend_needsr   r  rZ   r   r  typesZFunctionTypere   r   r  r   )Zrulesr   rl   Zretr
  ZrrZresr  r   r  r  s   &&&        rh   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 Jri   z%\s*python\s*module\s*(?P<name>[\w_]+)z4\s*python\s*module\s*(?P<name>[\w_]*?__user__[\w_]*)c                 s    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   )Zopen_f2py_module_name_match_f2py_user_module_name_matchZgroup)Zsourcer   r   ZlineZmr  rh   rL   rL     sd    D	fD'-Aq/55wwv  
 K 
 Ks   A#(A##A4	c           	      s   . 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 )r   ZuseZ__)re   r  r   )ZpymodZall_usesZinnerZmodblockr  r  rh   r_   r_     s{    HvfH||E""HLL,?,D,D,F X,Fq$VW-,F XY &  O !Ys    	B.Bc                s   . 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   )Zitemsr   rY   r   r   r  r   )Z
f2cmap_allZnew_mapZc2py_maprc   Zf2cmap_mappedZnew_map_lowerr  Zd1r  Zv1Zd1_lowers   &&&&       rh   r`   r`     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)r   r   )r  )F)Z__doc__Zpprintr   rf   r  Z	functoolsr    r  r   r   r   Z__all__ZversionZf2py_versionr[   rd   rj   r   rY   r   rq   rs   r   r   r   rI   rG   rH   r   r   rE   r   r7   r*   r   r   r(   r<   rP   rT   rO   rR   r#   r:   r9   r    r)   rQ   rU   r   rS   r   r   r   rF   r   r   r?   r>   r&   r'   rK   rM   r^   r   r   rD   r8   r=   r;   r!   r"   rJ   r   rN   r   r@   r%   r   rC   r   r1   r2   r5   r0   r4   r,   r   r.   r6   r-   r3   r+   r   r   r   r/   rA   rB   r   r   r   r   r   ra   r   rb   r   r   r   r   r   Z	Exceptionr   r]   rV   rX   rW   r$   r   r  r
   r	   r   r   r   r  r   r   r   r  r\   rZ   r   r   ZcompileZIZmatchr  r   rL   r_   r`   r   ri   rh   <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%ri   