https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/numpy/f2py/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/numpy/f2py/__pycache__/auxfuncs.cpython-310.pyc
o

6��aTU�@s�dZddlZddlZddlZddlmZddlmZddlmZgd�Z	ej
Zejj
ZejZiZgZdZdd	�Zd
d�Zdd
�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Z d$d%�Z!d&d'�Z"d(d)�Z#d*d+�Z$d,d-�Z%d.d/�Z&d0d1�Z'd2d3�Z(d4d5�Z)d6d7�Z*d8d9�Z+d:d;�Z,d<d=�Z-d>d?�Z.d@dA�Z/dBdC�Z0dDdE�Z1dFdG�Z2dHdI�Z3dJdK�Z4dLdM�Z5dNdO�Z6dPdQ�Z7dRdS�Z8dTdU�Z9dVdW�Z:dXdY�Z;dZd[�Z<d\d]�Z=d^d_�Z>d`da�Z?dbdc�Z@ddde�ZAdfdg�ZBdhdi�ZCdjdk�ZDdldm�ZEdndo�ZFdpdq�ZGdrds�ZHdtdu�ZIdvdw�ZJdxdy�ZKdzd{�ZLd|d}�ZMd~d�ZNd�d��ZOd�d��ZPd�d��ZQd�d��ZRd�d��ZSd�d��ZTd�d��ZUd�d��ZVd�d��ZWd�d��ZXeJd�eKd�eLd�eMd�ePd�eOd�eGd�eTd�eVd�eWd�eXd�iZYd�d��ZZd�d��Z[d�d��Z\d�d��Z]d�d��Z^d�d��Z_d�d��Z`d�d��Zad�d��Zbd�d��Zcd�d��Zdd�d��ZeGd�d��d�ef�ZgGd�d��d��Zhd�d��Zid�d��Zjd�d��Zkd�d„Zld�dĄZmd�d�dƄZnd�dȄZoifd�dʄZpd�d̄Zqd�d΄Zrd�dЄZsd�d҄Ztd�dԄZud�dքZvd�d؄Zwd�dڄZxd�d܄Zyd�d�d߄Zzd�d�Z{ifd�d�Z|dS)�aW

Auxiliary functions for f2py2e.

Copyright 1999,2000 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
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.
$Date: 2005/07/24 19:01:55 $
Pearu Peterson

�N)�reduce�)�__version__)�cfuncs)R�
applyrules�	debugcapi�
dictappend�errmess�gentitle�getargs2�getcallprotoargument�getcallstatement�getfortranname�getpymethoddef�
getrestdoc�getusercode�getusercode1�hasbody�hascallstatement�	hascommon�hasexternals�hasinitvalue�hasnote�
hasresultnote�
isallocatable�isarray�isarrayofstrings�	iscomplex�iscomplexarray�iscomplexfunction�iscomplexfunction_warn�isdouble�isdummyroutine�
isexternal�
isfunction�isfunction_wrap�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�
isrequired�	isroutine�isscalar�issigned_long_longarray�isstring�
isstringarray�isstringfunction�issubroutine�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_errorcCs t�dd�rtj�|�dSdS)N�verboser)�options�get�sys�stdout�write)�t�r_�5/usr/lib/python3/dist-packages/numpy/f2py/auxfuncs.pyrS>s�rScCsdtvS)N�capi)�debugoptions��varr_r_r`rC�rcCsd|vo|ddkot|�S)N�typespec�	character�r#rcr_r_r`�	_isstringGs�ricCst|�ot|�S�N)rirrcr_r_r`rCL�rCcCst|�od|vS)N�charselector�rCrcr_r_r`�ischaracterP�rncCst|�ot|�Srj)rrircr_r_r`rDTrorDcCst|�o|dddkS)N�	dimension���z(*))rDrcr_r_r`rXsrcCsd|vot|�S�Nrprhrcr_r_r`r^rkrcCst|�pt|�pt|�Srj)rrCr#rcr_r_r`rAbsrAcC�t|�o
|�d�dvS�Nrf)�complexzdouble complex�rArZrcr_r_r`rf��rcC�t|�o
|�d�dkS)Nrf�logicalrvrcr_r_r`r4k�r4cCrx)Nrf�integerrvrcr_r_r`r'orzr'cCrx)Nrf�realrvrcr_r_r`�isrealsrzr}cCsHz|ddWSty#z	|ddWYSty"YYdSww)N�kindselector�*�kind��KeyErrorrcr_r_r`�get_kindws��r�cCs*t|�sdS|�d�dvrdSt|�dkS)Nrrf�r{ry�8�rArZr�rcr_r_r`r9��
r9cC�*t|�sdS|�d�dkrdSt|�dkS)Nrrfr{�-1r�rcr_r_r`rJ�r�rJcCr�)Nrrfr{�-2r�rcr_r_r`rN�r�rNcCr�)Nrrfr{�-4r�rcr_r_r`rI�r�rIcCr�)Nrrfr{�-8r�rcr_r_r`rL�r�rLcC�*t|�sdS|�d�dksdSt|�dkS)Nrrfr|r�r�rcr_r_r`r!�r�r!cCr�)Nrrfr|�16r�rcr_r_r`r7�r�r7cCst|�sdSt|�dkS)Nr�32)rr�rcr_r_r`r6�sr6cCrsrt)rrZrcr_r_r`r�rwrcCs"t|�o|�d�dkot|�dkS)Nrfr{�1�rrZr�rcr_r_r`r&��
�r&cC�"t|�o|�d�dvot|�dkS)Nrfr�r�r�rcr_r_r`rK�r�rKcCr�)Nrfr�r�r�rcr_r_r`rO�r�rOcCr�)Nrfr�r�r�rcr_r_r`�isunsignedarray�r�r�cCr�)Nrfr�r�r�rcr_r_r`rM�r�rMcCr�)Nrfr�r�r�rcr_r_r`�issigned_chararray�r�r�cCr�)Nrfr��2r�rcr_r_r`�issigned_shortarray�r�r�cCr�)Nrfr��4r�rcr_r_r`�issigned_array�r�r�cCr�)Nrfr�r�r�rcr_r_r`rB�r�rBcC�d|vo	d|dvS)N�attrspec�allocatabler_rcr_r_r`r��rcCsd|vpt|�Srrrmrcr_r_r`�	ismutable�rkr�cC�d|vS)N�
modulenamer_��routr_r_r`r<�rer<cC�d|vo	d|dkS)N�block�moduler_r�r_r_r`r;�r�r;cCr�)Nr��functionr_r�r_r_r`r$r�r$cCs"t|�rdStot|�ot|�S�Nr)r)�	wrapfuncsr$r#r�r_r_r`r%sr%cCr�)Nr��
subroutiner_r�r_r_r`rFr�rFcCst|�rdSt|�o
t|�Sr�)r)rF�hasassumedshaper�r_r_r`rG�rGcCsV|�d�rdS|dD]}|d�|i��dg�D]}|dkr'd|d<dSqqdS)Nr�T�args�varsrp�:F�rZ)r��a�dr_r_r`r�s
��r�cC�t|�pt|�Srj)r<r�r�r_r_r`�requiresf90wrapper ror�cCr�rj)r$rFr�r_r_r`r@$ror@cC�Ft|�sdSd|vr|d}n|d}||dvr!t|d|�SdS�Nr�result�namer�)r$r4�r�r�r_r_r`r5(�
r5cCr�r�)r$r9r�r_r_r`r:4r�r:cCr�r�)r$r7r�r_r_r`r8@r�r8cCr�r�)r$rr�r_r_r`rLr�rcCst|�r
td�dSdS)Na�    **************************************************************
        Warning: code with a function returning complex value
        may not work correctly with your Fortran compiler.
        Run the following test before using it in your applications:
        $(f2py install dir)/test-site/{b/runme_scalar,e/runme}
        When using GNU gcc/g77 compilers, codes should work correctly.
    **************************************************************
rr)rrSr�r_r_r`r Xsr cCr�r�)r$rCr�r_r_r`rEfr�rEcC�d|vo|dS)N�	externalsr_r�r_r_r`rrrorcCr�)N�f2pyenhancements�
threadsafer_r�r_r_r`rHvs
�rHcCr�)Nr�r_r�r_r_r`�hasvariables{ror�cCs(d|vod|dvod|dvot|�S)Nr��optional�required)r1rcr_r_r`r=s

��r=cCr�)Nr��externalr_rcr_r_r`r#�r�r#cCst|�ot|�Srj)r=r1rcr_r_r`r?�rkr?cCspd|vrdSd|dvrdSd|dvrdSd|dvrdSd|dvr&dSd|dvr.dSd	|dvr6dSdS)
N�intentr�hider�inplace�in�out�inout�outinr_rcr_r_r`r.�sr.cCsDd|vo!d|dvsd|dvo!d|dvo!d|dvo!d|dvS)Nr�r�r�r�r�r�r_rcr_r_r`r/�s
�
�
�
�r/cC�d|�dg�vS)Nr�r�r�rcr_r_r`r2�ror2cCs<d|vod|dvpd|dvod|dvottt�|�S)Nr�r�r�r�)rRr/r0rcr_r_r`r-�s�r-cCs
t|�Srj)r-rcr_r_r`r1��
r1cCr�)N�cr�r�rcr_r_r`r)�ror)cCr�)N�cacher�r�rcr_r_r`�isintent_cache�ror�cCr�)N�copyr�r�rcr_r_r`r+�ror+cCr�)N�	overwriter�r�rcr_r_r`r3�ror3cCr�)N�callbackr�r�rcr_r_r`r*�ror*cCr�)Nr�r�r�rcr_r_r`r0�ror0cCr�)N�auxr�r�rcr_r_r`r(�ror(cCr�)N�aligned4r�r�rcr_r_r`�isintent_aligned4�ror�cCr�)N�aligned8r�r�rcr_r_r`�isintent_aligned8�ror�cCr�)N�	aligned16r�r�rcr_r_r`�isintent_aligned16�ror��	INTENT_IN�INTENT_INOUT�
INTENT_OUT�INTENT_HIDE�INTENT_CACHE�INTENT_C�OPTIONAL�INTENT_INPLACE�INTENT_ALIGNED4�INTENT_ALIGNED8�INTENT_ALIGNED16cCr�)Nr��privater_rcr_r_r`r>�r�r>cCr�)N�=r_rcr_r_r`r�rercCst|�sdS|dddvS)Nrr�)�"�')rrcr_r_r`�hasinitvalueasstring�r�r�cCr�)N�noter_rcr_r_r`r�rercCr�r�)r$rr�r_r_r`r�r�rcCr�)N�commonr_r�r_r_r`rrercCs4t|�rdSt|�r|dD]	}t|�rdSqdS)Nr�bodyr)rr�containscommon)r��br_r_r`r�s�r�cCs8t|�rdSt|�sdS|dD]	}t|�rdSqdS)Nrrr�)r;r�containsmodule)r�r�r_r_r`r�s�r�cCr�)Nr�r_r�r_r_r`rrercCst|�duSrj)r
r�r_r_r`rsrcC�dS)Nrr_rcr_r_r`�istrue"�r�cCr�r�r_rcr_r_r`�isfalse&r�r�c@seZdZdS)�	F2PYErrorN)�__name__�
__module__�__qualname__r_r_r_r`r�*sr�c@seZdZdd�Zdd�ZdS)rWcCs
||_dSrj)�mess)�selfr�r_r_r`�__init__0r�zthrow_error.__init__cCsd||jf}t|��)Nz

  var = %s
  Message: %s
)r�r�)r�rdr�r_r_r`�__call__3szthrow_error.__call__N)r�r�r�r�r�r_r_r_r`rW.srWcG�Ndg}}tt|��D]}d|||f}|�d|�qtd|d�|�f�S)N�lambda v�%s,f%d=f[%d]�f%d(v)�%s:%sz and ��range�len�append�eval�join��f�l�l2�ir_r_r`rP8�

rPcGr�)Nr�r�r�r�z or r�rr_r_r`rR@r
rRcCstd�S)Nzlambda v,f=f:not f(v))r)rr_r_r`rQHrerQcCs(z	|dddkWStyYdSw)Nr��fortranname�rr�r�r_r_r`r"Ls
�r"cCsTz|dd}|dkr
t�|std|d�t�W|Sty)|d}Y|Sw)Nr�rrz"Failed to use fortranname from %s
r�)r�r	)r�r�r_r_r`rSs���
�rcCs
z	|d�|�}Wn
tyYdSw|sdS|dkr#t|t�r#dSt|t�r4|t|�kr0dS||}|dd�dkr�|rQd|dt|�d|dd�}n|dd�}|dd�dkry|rq|dd�d	t|�d
}|S|dd�}|Std|t|�f�|S)Nr�r�z'''z
	/* start z multiline (z) */
���z
	/* end multiline (z)*/z-%s multiline block should end with `'''`: %s
)rZr��
isinstance�str�listr�reprr	)r��	blockname�comment�counter�rr_r_r`�getmultilineblockasF�
���
���
�rcC�
t|d�S)N�
callstatement�rr�r_r_r`r
r�r
c
Cst|ddd�}|r|St|�rtd�dSddlm}gg}}tttt��|�r0|�	ddg�|d	D]B}|d
|}t
|�rAq4||vrL||d}n%||�}tttt
t��|�r[n	t|�r`n|d}t|�slt|�rq|�d�|�|�q4d
�||�}	|	s�d}	|	S)N�callprotoargumentr)rz<warning: callstatement is defined without callprotoargument
r)�getctypezchar*�size_tr�r��_typedefr�,�void)rrrS�	capi_mapsrrPrErQr%�extendr*r)rRrArrCrrr)
r��cb_maprr�	arg_types�
arg_types2�nrd�ctype�
proto_argsr_r_r`r�s>�

rcCr)N�usercoderr�r_r_r`r�r�rcCst|ddd�S)Nr)r)rrr�r_r_r`r�srcCr)N�pymethoddefrr�r_r_r`r�r�rcCsvgg}}d|vr7|d}d|vr3|dD]}||vr |�|�q|D]}||vr.|�|�q#||fS|d}||fS)Nr��sortvars)r)r��sortargsr�r�r_r_r`�getargs�s

�
��r-cs�g��dg�}���fdd��d��D�}|��d�vrA�dD]}|�vr.|�|�q#�D]}||vr<|�|�q1�|fS|�d}�|fS)Nr�cs(g|]}t�d|�r|�vr|�qS)r�)r()�.0r��r�r�r_r`�
<listcomp>�s�zgetargs2.<locals>.<listcomp>r�r+)rZ�keysr)r�r,�auxvarsr�r_r/r`r�s
�
��rcCs<d|vrdSd}|ddkr|d|df}|d�|d�S)N�f2pymultilinesr�z
python moduler�r�)r��kr_r_r`r�srcCs*dt|�dd}d|d||dfS)N�P��z/*%s %s %s*/r)r)r�rr_r_r`r
�sr
cCs$t|t�rttfdd�|g�S|gS)NcSs|||�Srjr_)�x�yrr_r_r`�<lambda>�szflatlist.<locals>.<lambda>)rrr�flatlist)rr_r_r`r;�s
r;cCs |r|ddkr|dd�S|S)Nrqrr_)�sr_r_r`rV�srVrc	s�t�t�r��fdd��D�St�t�r��fdd��D�Sdt����D];}|dkr-q&d�vr>|�dvr>�d|}n�}t�|t�rW��d||�t�|����q&��d|�|��q&�S)Ncsg|]}t�|���qSr_�rT�r.�_m)�
defaultseprr_r`r0��zreplace.<locals>.<listcomp>csg|]}t|����qSr_r=r>)r�r@r_r`r0�rAr7�
separatorsforz#%s#)rrr1rTrr;)rr�r@r4�sepr_)r�r@rr`rT�s

 rTcCs(t|t�r|D]}t||�}q|S|��D]|}|ddkrq||vr�t||t�r0||g||<t||t�rSt||t�rI||||||<q||�||�qt||t�r�t||t�r�|dkr||��D]}|||vr}||||||<qkqt||||�||<q||||<q|S)Nr�_rB)rrrr1rr�dict)�rd�arr�r4�k1r_r_r`rs4
���rcCs�i}t|t�r |D]}t|||�}t||�}d|vr|Sq	|Sd|vr,|d|�s,|Sd|vrEtd|di||�}d|vrEt�|d�|��D]�}|dkrV||||<qIt||t�rgt|||�||<n�t||t�r�g||<||D]}t||i||�}	||	vr�||�	|	|�qvn�|ddkr�qIt||t
��rg||<||��D]l}
t|
tj��r|
|��rt|||
t�r�|||
D]$}t|t
�r�td|i||�}d|vr�|d}nd	}||�	t||��q�q�|||
}t|t
��r
td|i|�}d|v�r|d}nd	}||�	t||��q�n
t
d
t||��t||t��rCt||�dk�r9||d||<||gk�rC||=qI|S)N�_break�_check�need�needsrBrrD�	supertextrzapplyrules: ignoring rule %s.
r)rrrrr�append_needsr1rrTrrE�types�FunctionTyper	rr)�rulesr�rd�retr�rr�resr4r	rGrHr_r_r`rs|

���

�	

���r)rr)r)}�__doc__�pprintr[rO�	functoolsrrrr�__all__�version�f2py_version�stderrr]r	rUrYrbr�rSrrirCrnrDrrrArr4r'r}r�r9rJrNrIrLr!r7r6rr&rKrOr�rMr�r�r�rBrr�r<r;r$r%rFrGr�r�r@r5r:r8rr rErrHr�r=r#r?r.r/r2r-r1r)r�r+r3r*r0r(r�r�r�r,r>rr�rrrr�r�rrr�r��	Exceptionr�rWrPrRrQr"rrr
rrrrr-rrr
r;rVrTrrr_r_r_r`�<module>s�
�


$	


https://t.me/RX1948 - 2025