Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib64/python3.7/site-packages/numpy/f2py/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/site-packages/numpy/f2py/__pycache__/rules.cpython-37.pyc

B

��Fd���2@sPdZddlmZmZmZddd�ZddlmZejaddl	Z	ddl
Z
ddlZdd	lm
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGmHZHmIZIdd
lmJZJddlmKZKddlmLZLdd
lmMZMddlmNZNddlmOZOiaPiZQxdD]ZRdeQeR<�q�Wde
�Se
�Te
�
���ddded�ded�ded�ded�ded�ded �d!ed"�d#ed$�d%ed&�d'ed(�d)ed*�d+ed,�d-ed.�d/ed0�d1ed2�d3d4d/d/d5�d6d7d8gd9d:gd;�ZUd<d=d>d?d@dAdBdCdCedDeEe�dCidE�
gZVeQdFdGdHdIdJdKdLdMdNdOgedPidQdRgdSgdT�ZWddddddUdddddVddddddW�dCdCdCdCdCdCdXdYdCdCdCdCdZd[d\d]d^d_d`dadCdCdCdbdcgdddegdfdgdhdidjdCdCdCdCdCdCdCdCdCdCdCdCdCedkeEe�dCidl�/dmdndCeEe2�do�dpdqdCe2do�dreDeEeFe2e$��eEe��dseDeEe2�e$eEe��dte2dCedCieEeFe2e$e��dueDeEe2�e$eEe��dveDeEe2�e�dwieDeEeFe2e$��eEe��dxiedygiedzie<d{ied|ieEeFee��d}ie<d~iedigeDe:eEe;��d��dreEeFe2e��d�edCieEeFe2e��d�edwieEeFe2e��d�ieEeFe2e��d�dxgied�gied�ie<d�ieEeFee��d�ied�ie<d�ied�ige!d��dreEeFe2e��d�edCieEeFe2e��d�edwieEeFe2e��d�ieEeFe2e��d�dxgied�gied�ie<d�ieEeFee��d�ied�ie<d�ied�ige;d��d�eEe'�d�id�d�ed�igeDee9�d�ieDeeEe9��d�igeDe eEe!��d��eDeEeFe2e$��eEe��d�eDeEe2�e$eEe��d�edCieDeEeFe2e$��eEe��dueDeEe2�e$eEe��dvedwied�eEe�d�ied�iged�ie<d�ied�ieEeFee��d�ie<d�ied�ieDee�d�ieDeeEe��d�iged�ieEe�dxied�ie1d�ie/d�igeEe'�d�ied�eEeFee'��d�ieDe eEe9�eEe!��d��	dseEeFe2e$��dueDeEe2�e$�dvid�d�gd�d�d�d�d�d�d�d�d�edzie<d�id�e<d�iedied�id�gd�d�d�dxd�d�geDe9eEe!��d��
d�d�d�ed��g
ZXe0d�e.d�e-d�e>d�eBd�e=d�e@d�e?d�eCd�eAd�e6d�iZYd�eQid�ed�igd�eYdƜd�ed�ied�ieDe5eEe��dʜd�d�d�d�eDe5eEe�e*�dΜd�ed�iedќd�d�gd�ge7d՜d�d�d�gd�ed�iedNiged՜d�eDeeEe��id�eDeeEe�e)�id�e"dCdۜd�e?dCdۜd�eCdCdۜd�eAdCdۜd�edCdۜed�id�e8dޜgZZd�eQid�ed�igd�dCeYd�eDe3e)�d�ieDe4e)�d�ie*d�ieDe3e)�d�edkigieDe4e)�d�edkigie*d�eDee'�dkeDee)�d�igidCd�d�d�eDe)eEe3��d�d�d�d�eDe)e3�d�d�d�e*d�e)d�ie)d�ie)d�id�d�e)d�id�d�d�d�eEe%�d�ige)d�ie4d�ie3d�ie)d�ie4d�ie3d�id�d�eEe%�d�id�d�ged��eEe%��die%�di�de�deEe%��digi�dg�d�d�dgedC�d	�d�e�d
ie$d�eEe$��die*d�ieDe5eEe���d�ed�ieDe5eEe���d
�d�e4d�ie3d�ie4d�ie3d�ie(�die(�die(�dieDe5eEe�e)��d�	e�d�ddCieDe3eEe���d�ddCieEe,��die,�dig�deEe,��dieDe5eEe�e)�dC�d	�ed�ieYeDe5eEe�e'�dC�d�e�d
ieDe5eEe��dC�d�d�e$d�eEe$��die�die*�die�d�d�e4d�ie3d�ie4d�ie3d�ie(�die(�die(�dieDee)��d �	e�d!ieDe3eEe���di�dg�d"�dgeDee)�dC�d	�e*d�ieDee'��d#�ed�ieDee'�dC�d�e*�d$id�ge�d%�e�diedC�d�d�d�d�gd�d&e�d'ie*d�id�ge7�d(��d)�d*�dd�d�ge7dC�d	�e4d�ie3d�ie4d�ie3d�ie(�d+ie(�die(�dieDe7e)��d,�d�eDe7e'�ie�d'ie7dC�d�d�d�dؐd-�d.gd�e*�d/id�e�d0��d1�d2�d3�d4�d5�d6�d7eDee+��d8��d9eDee+�dC�d��d:�d2�d3�d4�d;�d6�d<eDee&��d8��d9eDee&�dC�d�ed�iedNigedCdۜd�e4d�ie3d�ie4d�ie3d�ieDee)��d=��d>�d?e'�d@ie)�dAi�dBee)�dCie'�dDie�dEi�dFgig�dGeEeFe*e'���dHieDe'eEe*���dIie�dJigedC�dK�d�eDeeEe��id�eDeeEe�e)�id�e"dCdۜd�e?dCdۜd�eCdCdۜd�eAdCdۜd�edCdۜed�id�e8dޜg*Z[e�dLidԐdM��dN�dO�dPeDe5eEe��dC�dQ��dR�dS�dTe7dC�dQ��dU�dV�dWedC�dX��dY�dZ�d[�d\�gZ\�d]�d^�Z]�d_�d`�da�db�db�db�db�db�db�db�dc�
Z^�dd�de�Z_dS(faG

Rules for building C/API module with f2py2e.

Here is a skeleton of a new wrapper function (13Dec2001):

wrapper_function(args)
  declarations
  get_python_arguments, say, `a' and `b'

  get_a_from_python
  if (successful) {

    get_b_from_python
    if (successful) {

      callfortran
      if (successful) {

        put_a_to_python
        if (successful) {

          put_b_to_python
          if (successful) {

            buildvalue = ...

          }

        }

      }

    }
    cleanup_b

  }
  cleanup_a

  return buildvalue

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 License.

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.
$Date: 2005/08/30 08:58:42 $
Pearu Peterson

�)�division�absolute_import�print_functionz$Revision: 1.129 $�
����)�__version__N)=�
applyrules�	debugcapi�
dictappend�errmess�gentitle�getargs2�hascallstatement�hasexternals�hasinitvalue�hasnote�
hasresultnote�isarray�isarrayofstrings�	iscomplex�iscomplexarray�iscomplexfunction�iscomplexfunction_warn�isdummyroutine�
isexternal�
isfunction�isfunction_wrap�isint1array�isintent_aux�
isintent_c�isintent_callback�
isintent_copy�
isintent_hide�isintent_inout�isintent_nothide�isintent_out�isintent_overwrite�	islogical�islong_complex�
islong_double�islong_doublefunction�islong_long�islong_longfunction�ismoduleroutine�
isoptional�
isrequired�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�
stripcomma)�	capi_maps)�cfuncs)�common_rules)�	use_rules)�f90mod_rules)�	func2subr)�decl�	frompyobj�cleanupfrompyobj�topyarr�method�	pyobjfrom�closepyobjfrom�freemem�userincludes�	includes0�includes�typedefs�typedefs_generated�	cppmacrosrG�	callbacks�latexdoc�restdoc�routine_defs�externroutines�initf2pywraphooks�commonhooks�initcommonhooks�f90modhooks�initf90modhooks�
a/* File: #modulename#module.c
 * This file is auto-generated with f2py (version:#f2py_version#).
 * f2py is a Fortran to Python Interface Generator (FPIG), Second Edition,
 * written by Pearu Peterson <pearu@cens.ioc.ee>.
 * See http://cens.ioc.ee/projects/f2py2e/
 * Generation date: z
 * $Rzevision:$
 * $Dz{ate:$
 * Do not edit this file directly unless you know what you are doing!!!
 */

#ifdef __cplusplus
extern "C" {
#endif

zSee f2py2e/cfuncs.py: includesz
#includes#
#includes0#

z,See f2py2e/rules.py: mod_rules['modulebody']zM
static PyObject *#modulename#_error;
static PyObject *#modulename#_module;

zSee f2py2e/cfuncs.py: typedefsz
#typedefs#

z(See f2py2e/cfuncs.py: typedefs_generatedz
#typedefs_generated#

zSee f2py2e/cfuncs.py: cppmacrosz
#cppmacros#

zSee f2py2e/cfuncs.py: cfuncsz
#cfuncs#

z"See f2py2e/cfuncs.py: userincludesz
#userincludes#

z"See f2py2e/capi_rules.py: usercodez9
#usercode#

/* See f2py2e/rules.py */
#externroutines#

z#See f2py2e/capi_rules.py: usercode1z
#usercode1#

z%See f2py2e/cb_rules.py: buildcallbackz
#callbacks#

zSee f2py2e/rules.py: buildapiz	
#body#

z&See f2py2e/f90mod_rules.py: buildhooksz
#f90modhooks#

z/See f2py2e/rules.py: module_rules['modulebody']z

z&See f2py2e/common_rules.py: buildhooksz
#commonhooks#

zSee f2py2e/rules.pya�

static FortranDataDef f2py_routine_defs[] = {
#routine_defs#
	{NULL}
};

static PyMethodDef f2py_module_methods[] = {
#pymethoddef#
	{NULL,NULL}
};

#if PY_VERSION_HEX >= 0x03000000
static struct PyModuleDef moduledef = {
	PyModuleDef_HEAD_INIT,
	"#modulename#",
	NULL,
	-1,
	f2py_module_methods,
	NULL,
	NULL,
	NULL,
	NULL
};
#endif

#if PY_VERSION_HEX >= 0x03000000
#define RETVAL m
PyMODINIT_FUNC PyInit_#modulename#(void) {
#else
#define RETVAL
PyMODINIT_FUNC init#modulename#(void) {
#endif
	int i;
	PyObject *m,*d, *s;
#if PY_VERSION_HEX >= 0x03000000
	m = #modulename#_module = PyModule_Create(&moduledef);
#else
	m = #modulename#_module = Py_InitModule("#modulename#", f2py_module_methods);
#endif
	Py_TYPE(&PyFortran_Type) = &PyType_Type;
	import_array();
	if (PyErr_Occurred())
		{PyErr_SetString(PyExc_ImportError, "can't initialize module #modulename# (failed to import numpy)"); return RETVAL;}
	d = PyModule_GetDict(m);
	s = PyString_FromString("$Raevision: $");
	PyDict_SetItemString(d, "__version__", s);
#if PY_VERSION_HEX >= 0x03000000
	s = PyUnicode_FromString(
#else
	s = PyString_FromString(
#endif
		"This module '#modulename#' is auto-generated with f2py (version:#f2py_version#).\nFunctions:\n"
#docs#".");
	PyDict_SetItemString(d, "__doc__", s);
	#modulename#_error = PyErr_NewException ("#modulename#.error", NULL, NULL);
	Py_DECREF(s);
	for(i=0;f2py_routine_defs[i].name!=NULL;i++)
		PyDict_SetItemString(d, f2py_routine_defs[i].name,PyFortranObject_NewAsAttr(&f2py_routine_defs[i]));
#initf2pywraphooks#
#initf90modhooks#
#initcommonhooks#
#interface_usercode#

#ifdef F2PY_REPORT_ATEXIT
	if (! PyErr_Occurred())
		on_exit(f2py_report_on_exit,(void*)"#modulename#");
#endif

	return RETVAL;
}
#ifdef __cplusplus
}
#endif
)r[r\z*\section{Module \texttt{#texmodulename#}}
z
#modnote#
z
#latexdoc#zdModule #modulename#
================================================================================z

#restdoc#)�
modulebody�
separatorsforr[r\z/*eof body*/z/*eof method*/z/*eof externroutines*/z/*eof routine_defs*/z/*eof initf90modhooks*/z/*eof initf2pywraphooks*/z/*eof initcommonhooks*/�z#note#)
�bodyrPr^r]rcr_rar[r\Zmodnotea�
#begintitle#
static char doc_#apiname#[] = "\
#docreturn##name#(#docsignatureshort#)\n\nWrapper for ``#name#``.\
\n#docstrsigns#";
/* #declfortranroutine# */
static PyObject *#apiname#(const PyObject *capi_self,
                           PyObject *capi_args,
                           PyObject *capi_keywds,
                           #functype# (*f2py_func)(#callprotoargument#)) {
	PyObject * volatile capi_buildvalue = NULL;
	volatile int f2py_success = 1;
#decl#
	static char *capi_kwlist[] = {#kwlist##kwlistopt##kwlistxa#NULL};
#usercode#
#routdebugenter#
#ifdef F2PY_REPORT_ATEXIT
f2py_start_clock();
#endif
	if (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\
		"#argformat##keyformat##xaformat#:#pyname#",\
		capi_kwlist#args_capi##keys_capi##keys_xa#))
		return NULL;
#frompyobj#
/*end of frompyobj*/
#ifdef F2PY_REPORT_ATEXIT
f2py_start_call_clock();
#endif
#callfortranroutine#
if (PyErr_Occurred())
  f2py_success = 0;
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_call_clock();
#endif
/*end of callfortranroutine*/
		if (f2py_success) {
#pyobjfrom#
/*end of pyobjfrom*/
		CFUNCSMESS("Building return value.\n");
		capi_buildvalue = Py_BuildValue("#returnformat#"#return#);
/*closepyobjfrom*/
#closepyobjfrom#
		} /*if (f2py_success) after callfortranroutine*/
/*cleanupfrompyobj*/
#cleanupfrompyobj#
	if (capi_buildvalue == NULL) {
#routdebugfailure#
	} else {
#routdebugleave#
	}
	CFUNCSMESS("Freeing memory.\n");
#freemem#
#ifdef F2PY_REPORT_ATEXIT
f2py_stop_clock();
#endif
	return capi_buildvalue;
}
#endtitle#
z
#routine_def#z#initf2pywraphook#z#declfortranroutine#z!#docreturn##name#(#docsignature#)z&#docreturn##name#(#docsignatureshort#)z'"	#docreturn##name#(#docsignature#)\n"
z
arrayobject.hZ
CFUNCSMESSZMINMAXz#define DEBUGCFUNCSz1\subsection{Wrapper function \texttt{#texname#}}
zk
\noindent{{}\verb@#docreturn##name#@{}}\texttt{(#latexdocsignatureshort#)}
#routnote#

#latexdocstrsigns#
zlWrapped function ``#name#``
--------------------------------------------------------------------------------)rfrhr]r_r^�doc�docshortZdocs�needrYr[r\z || z\n"
")�callfortranroutine�routdebugenterrL�routdebugleave�routdebugfailure�	setjmpbuf�	docstrreq�	docstropt�	docstrout�	docstrcbs�docstrsigns�latexdocstrsigns�latexdocstrreq�latexdocstropt�latexdocstrout�latexdocstrcbsz/*decl*/z/*freemem*/z\nParameters\n----------z$\nOther Parameters\n----------------z\nReturns\n-------z'\nNotes\n-----\nCall-back functions::\nz\noindent Required arguments:z\noindent Optional arguments:z\noindent Return objects:z\noindent Call-back functions:z
/*frompyobj*/z/*end of cleanupfrompyobj*/z
/*pyobjfrom*/z/*end of closepyobjfrom*/z/*topyarr*/z/*routdebugleave*/z/*routdebugenter*/z/*routdebugfailure*/z/*callfortranroutine*/z
--- #note#)/rf�kwlist�	kwlistopt�callfortran�callfortranappend�docsign�
docsignoptrLrSZdocsignshort�docsignoptshortrurvrqrrrsrtrwrxryrz�	args_capi�	keys_capi�functyperMrNrQrRrOrnrmrorl�	argformat�	keyformatZneed_cfuncs�	docreturn�return�returnformatZrformat�kwlistxa�keys_xa�xaformat�	docsignxa�docsignxashort�initf2pywraphookZroutnotezf2py_rout_#modulename#_#name#z#modulename#.#name#)ZapinameZpynamerL�_checkz-f2py_rout_#modulename#_#f90modulename#_#name#z##modulename#.#f90modulename#.#name#�voidzGextern void #F_FUNC#(#fortranname#,#FORTRANNAME#)(#callprotoargument#);z/extern void #fortranname#(#callprotoargument#);zn	{"#name#",-1,{{-1}},0,(char *)#F_FUNC#(#fortranname#,#FORTRANNAME#),(f2py_init_func)#apiname#,doc_#apiname#},zV	{"#name#",-1,{{-1}},0,(char *)#fortranname#,(f2py_init_func)#apiname#,doc_#apiname#},zE	{"#name#",-1,{{-1}},0,NULL,(f2py_init_func)#apiname#,doc_#apiname#},ZF_FUNCzR	fprintf(stderr,"debug-capi:Fortran subroutine `#fortranname#(#callfortran#)'\n");z4		if (#setjmpbuf#) {
			f2py_success = 0;
		} else {z			Py_BEGIN_ALLOW_THREADSz9				#callstatement#;
				/*(*f2py_func)(#callfortran#);*/z 				(*f2py_func)(#callfortran#);z			Py_END_ALLOW_THREADSz		})r��declfortranroutine�routine_defrkrlr�zFextern void #F_WRAPPEDFUNC#(#name_lower#,#NAME#)(#callprotoargument#);zm	{"#name#",-1,{{-1}},0,(char *)#F_WRAPPEDFUNC#(#name_lower#,#NAME#),(f2py_init_func)#apiname#,doc_#apiname#},a�
    {
      extern #ctype# #F_FUNC#(#name_lower#,#NAME#)(void);
      PyObject* o = PyDict_GetItemString(d,"#name#");
      PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)#F_FUNC#(#name_lower#,#NAME#),NULL));
#if PY_VERSION_HEX >= 0x03000000
      PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("#name#"));
#else
      PyObject_SetAttrString(o,"__name__", PyString_FromString("#name#"));
#endif
    }
    Z
F_WRAPPEDFUNCzY	fprintf(stderr,"debug-capi:Fortran subroutine `f2pywrap#name_lower#(#callfortran#)'\n");z1	if (#setjmpbuf#) {
		f2py_success = 0;
	} else {z	Py_BEGIN_ALLOW_THREADSz	(*f2py_func)(#callfortran#);z3	#callstatement#;
	/*(*f2py_func)(#callfortran#);*/z	Py_END_ALLOW_THREADSz	})r�r�r�r�rkrlr�a�
    {
      extern void #F_FUNC#(#name_lower#,#NAME#)(void);
      PyObject* o = PyDict_GetItemString(d,"#name#");
      PyObject_SetAttrString(o,"_cpointer", F2PyCapsule_FromVoidPtr((void*)#F_FUNC#(#name_lower#,#NAME#),NULL));
#if PY_VERSION_HEX >= 0x03000000
      PyObject_SetAttrString(o,"__name__", PyUnicode_FromString("#name#"));
#else
      PyObject_SetAttrString(o,"__name__", PyString_FromString("#name#"));
#endif
    }
    z#ctype#z#rname#,z#pydocsignout#z"\item[]{{}\verb@#pydocsignout#@{}}z--- #resultnote#z�#ifdef USESCOMPAQFORTRAN
	fprintf(stderr,"debug-capi:Fortran function #ctype# #fortranname#(#callcompaqfortran#)\n");
#else
	fprintf(stderr,"debug-capi:Fortran function #ctype# #fortranname#(#callfortran#)\n");
#endif
zW	fprintf(stderr,"debug-capi:Fortran function #ctype# #fortranname#(#callfortran#)\n");
)r�r�rsryrlr�zJextern #ctype# #F_FUNC#(#fortranname#,#FORTRANNAME#)(#callprotoargument#);z2extern #ctype# #fortranname#(#callprotoargument#);z#	#ctype# #name#_return_value={0,0};z	#ctype# #name#_return_value=0;z.	PyObject *#name#_return_value_capi = Py_None;zJ	#callstatement#;
/*	#name#_return_value = (*f2py_func)(#callfortran#);*/
z3	#name#_return_value = (*f2py_func)(#callfortran#);zV	fprintf(stderr,"#routdebugshowvalue#\n",#name#_return_value.r,#name#_return_value.i);z>	fprintf(stderr,"#routdebugshowvalue#\n",#name#_return_value);zE	#name#_return_value_capi = pyobj_from_#ctype#1(#name#_return_value);zpyobj_from_#ctype#1Z	long_longZlong_doublez	#rformat#z,#name#_return_value_capiz,#name#_return_value)	r�r�rLrlrQrkr�r�r�z$	#ctype# #name#_return_value = NULL;z!	int #name#_return_value_len = 0;z,#name#_return_value,#name#_return_value_len,z%	#name#_return_value_len = #rlength#;z`	if ((#name#_return_value = (string)malloc(sizeof(char)*(#name#_return_value_len+1))) == NULL) {z6		PyErr_SetString(PyExc_MemoryError, "out of memory");z		f2py_success = 0;z		} else {z8		(#name#_return_value)[#name#_return_value_len] = '\0';z	if (f2py_success) {z		Py_BEGIN_ALLOW_THREADSzj#ifdef USESCOMPAQFORTRAN
		(*f2py_func)(#callcompaqfortran#);
#else
		(*f2py_func)(#callfortran#);
#endif
z		Py_END_ALLOW_THREADSzW		fprintf(stderr,"#routdebugshowvalue#\n",#name#_return_value_len,#name#_return_value);z/	} /* if (f2py_success) after (string)malloc */z!	STRINGFREE(#name#_return_value);Z
STRINGFREE)
r�r�rLr}rlr�r�rSrkr�zZ	fprintf(stderr,"debug-capi:Python C/API function #modulename#.#name#(#docsignature#)\n");zW	fprintf(stderr,"debug-capi:Python C/API function #modulename#.#name#: successful.\n");zT	fprintf(stderr,"debug-capi:Python C/API function #modulename#.#name#: failure.\n");)rmrnror�Zcomplex_long_doubleZ
unsigned_charZunsigned_shortZunsignedZunsigned_long_longrfz.	/* Processing auxiliary variable #varname# */z$	fprintf(stderr,"#vardebuginfo#\n");z)	/* End of cleaning variable #varname# */)rMrNrkz	#ctype# #varname# = 0;zmath.hz	#varname# = #init#;)rLrkrMr�z
,#varname#z
#outvarname#,z#varrformat#)r�rsr�r�r�z	#ctype# #varname#;z0	#varname#.r = #init.r#, #varname#.i = #init.i#;)rLrMr�z	#ctype# #varname# = NULL;z	int slen(#varname#);zlen..)rLrkr�z	#ctype# *#varname# = NULL;z1	npy_intp #varname#_Dims[#rank#] = {#rank*[-1]#};z#	const int #varname#_Rank = #rank#;Zforcombr�)rkr��_dependzflen(#varname#),�string)r~rkr�z$	/* Processing variable #varname# */)rMrNr�rkz#pydocsign#z\item[]{{}\verb@#pydocsign#@{}}z--- See above.)rrrqrsrxrwryZdependz"#varname#",z
#varname#,)r{rr�z#varname#=#showinit#,)r|r�r�r�)r�r�r�z#varname#_extra_args=(),z#varname#_extra_args,z=#varname#_extra_args : input tuple, optional\n    Default: ()z
#cbdocstr#z\item[] #cblatexdocstr#z}\item[]{{}\verb@#varname#_extra_args := () input tuple@{}} --- Extra arguments for call-back function {{}\verb@#varname#@{}}.z$	PyObject *#varname#_capi = Py_None;z)	PyTupleObject *#varname#_xa_capi = NULL;z+	PyTupleObject *#varname#_args_capi = NULL;z 	int #varname#_nofargs_capi = 0;z!	#cbname#_typedef #varname#_cptr;z"#varname#_extra_args",�OzO!z,&#varname#_capiz!,&PyTuple_Type,&#varname#_xa_capiz(setjmp(#cbname#_jmpbuf))z#varname#_cptr,z#cbname#zsetjmp.h)r�r�rrrtrzrxrLr�r�r�r�r�r�r�rpr}rkr�z�if(F2PyCapsule_Check(#varname#_capi)) {
  #varname#_cptr = F2PyCapsule_AsVoidPtr(#varname#_capi);
} else {
  #varname#_cptr = #cbname#;
}
a�if (#varname#_capi==Py_None) {
  #varname#_capi = PyObject_GetAttrString(#modulename#_module,"#varname#");
  if (#varname#_capi) {
    if (#varname#_xa_capi==NULL) {
      if (PyObject_HasAttrString(#modulename#_module,"#varname#_extra_args")) {
        PyObject* capi_tmp = PyObject_GetAttrString(#modulename#_module,"#varname#_extra_args");
        if (capi_tmp)
          #varname#_xa_capi = (PyTupleObject *)PySequence_Tuple(capi_tmp);
        else
          #varname#_xa_capi = (PyTupleObject *)Py_BuildValue("()");
        if (#varname#_xa_capi==NULL) {
          PyErr_SetString(#modulename#_error,"Failed to convert #modulename#.#varname#_extra_args to tuple.\n");
          return NULL;
        }
      }
    }
  }
  if (#varname#_capi==NULL) {
    PyErr_SetString(#modulename#_error,"Callback #varname# not defined (as an argument or module #modulename# attribute).\n");
    return NULL;
  }
}
a	#varname#_nofargs_capi = #cbname#_nofargs;
	if (create_cb_arglist(#varname#_capi,#varname#_xa_capi,#maxnofargs#,#nofoptargs#,&#cbname#_nofargs,&#varname#_args_capi,"failed in processing argument list for call-back #varname#.")) {
		jmp_buf #varname#_jmpbuf;z�		fprintf(stderr,"debug-capi:Assuming %d arguments; at most #maxnofargs#(-#nofoptargs#) is expected.\n",#cbname#_nofargs);
		CFUNCSMESSPY("for #varname#=",#cbname#_capi);zE		fprintf(stderr,"#vardebugshowvalue# (call-back in C).\n",#cbname#);z�		CFUNCSMESS("Saving jmpbuf for `#varname#`.\n");
		SWAP(#varname#_capi,#cbname#_capi,PyObject);
		SWAP(#varname#_args_capi,#cbname#_args_capi,PyTupleObject);
		memcpy(&#varname#_jmpbuf,&#cbname#_jmpbuf,sizeof(jmp_buf));a		CFUNCSMESS("Restoring jmpbuf for `#varname#`.\n");
		#cbname#_capi = #varname#_capi;
		Py_DECREF(#cbname#_args_capi);
		#cbname#_args_capi = #varname#_args_capi;
		#cbname#_nofargs = #varname#_nofargs_capi;
		memcpy(&#cbname#_jmpbuf,&#varname#_jmpbuf,sizeof(jmp_buf));
	}ZSWAPZcreate_cb_arglist)rMrNrkr�r�z3	fprintf(stderr,"#vardebugshowvalue#\n",#varname#);z&#varname#,)rLrQr}r�r�)rkr�zW	f2py_success = try_pyarr_from_#ctype#(#varname#_capi,&#varname#);
	if (f2py_success) {z/	} /*if (f2py_success) of #varname# pyobjfrom*/ztry_pyarr_from_#ctype#)	rLr�r�r�r�rQrRrkr�z8	if (#varname#_capi == Py_None) #varname# = #init#; elser�z	if (#varname#_capi != Py_None)z�		f2py_success = #ctype#_from_pyobj(&#varname#,#varname#_capi,"#pyname#() #nth# (#varname#) can't be converted to #ctype#");
	if (f2py_success) {z`		#varname# = (#ctype#)PyObject_IsTrue(#varname#_capi);
		f2py_success = 1;
	if (f2py_success) {z%	} /*if (f2py_success) of #varname#*/z#ctype#_from_pyobj)rMrkr�r�)rMr�r�zA	fprintf(stderr,"#vardebugshowvalue#\n",#varname#.r,#varname#.i);z,#varname#_capi)rLr}rQr�r�zY		f2py_success = try_pyarr_from_#ctype#(#varname#_capi,&#varname#);
		if (f2py_success) {z0		} /*if (f2py_success) of #varname# pyobjfrom*/)	rLr�r�r�r�rkrQrRr�zT	if (#varname#_capi==Py_None) {#varname#.r = #init.r#, #varname#.i = #init.i#;} elsez0	}  /*if (f2py_success) of #varname# frompyobj*/)rLr�z1	#varname#_capi = pyobj_from_#ctype#1(#varname#);)rQrkr�zslen(#varname#),zC	fprintf(stderr,"#vardebugshowvalue#\n",slen(#varname#),#varname#);)rLr}r~rQr�rkr�z�	slen(#varname#) = #length#;
	f2py_success = #ctype#_from_pyobj(&#varname#,&slen(#varname#),#init#,#varname#_capi,"#ctype#_from_pyobj failed in converting #nth# `#varname#' of #pyname# to C #ctype#");
	if (f2py_success) {z?		STRINGFREE(#varname#);
	}  /*if (f2py_success) of #varname#*/zV	f2py_success = try_pyarr_from_#ctype#(#varname#_capi,#varname#);
	if (f2py_success) {)r�r�r�r�rQrRrkr�z*	PyArrayObject *capi_#varname#_tmp = NULL;z	int capi_#varname#_intent = 0;z,capi_#varname#_tmp)rLr}r�rkr�z"	int capi_overwrite_#varname# = 1;z"overwrite_#varname#",�iz,&capi_overwrite_#varname#zoverwrite_#varname#=1,zoverwrite_#varname#,z9overwrite_#varname# : input int, optional\n    Default: 1)rLr�r�r�r�r�rrr�zH	capi_#varname#_intent |= (capi_overwrite_#varname#?0:F2PY_INTENT_COPY);z"	int capi_overwrite_#varname# = 0;zoverwrite_#varname#=0,z9overwrite_#varname# : input int, optional\n    Default: 0)rLr�r�r�r�r�z	#setdims#;z#	capi_#varname#_intent |= #intent#;zl	capi_#varname#_tmp = array_from_pyobj(#atype#,#varname#_Dims,#varname#_Rank,capi_#varname#_intent,Py_None);zs	capi_#varname#_tmp = array_from_pyobj(#atype#,#varname#_Dims,#varname#_Rank,capi_#varname#_intent,#varname#_capi);z�	if (capi_#varname#_tmp == NULL) {
		if (!PyErr_Occurred())
			PyErr_SetString(#modulename#_error,"failed in converting #nth# `#varname#' of #pyname# to C/Fortran array" );
	} else {
		#varname# = (#ctype# *)(PyArray_DATA(capi_#varname#_tmp));
z!	if (#varname#_capi == Py_None) {z	{z		#ctype# capi_c;a�		int *_i,capi_i=0;
		CFUNCSMESS("#name#: Initializing #varname#=#init#\n");
		if (initforcomb(PyArray_DIMS(capi_#varname#_tmp),PyArray_NDIM(capi_#varname#_tmp),1)) {
			while ((_i = nextforcomb()))
				#varname#[capi_i++] = #init#; /* fortran way */
		} else {
			if (!PyErr_Occurred())
				PyErr_SetString(#modulename#_error,"Initialization of #nth# #varname# failed (initforcomb).");
			f2py_success = 0;
		}
	}
	if (f2py_success) {z=	}  /*if (capi_#varname#_tmp == NULL) ... else of #varname#*/zY	if((PyObject *)capi_#varname#_tmp!=#varname#_capi) {
		Py_XDECREF(capi_#varname#_tmp); }z!		Py_XDECREF(capi_#varname#_tmp);z+	}  /*if (f2py_success) of #varname# init*/)rMrNr�r�z3	fprintf(stderr,"debug-capi:Checking `#check#'\n");)rMrkzN	CHECKSCALAR(#check#,"#check#","#nth# #varname#","#varshowvalue#",#varname#) {z	} /*CHECKSCALAR(#check#)*/ZCHECKSCALAR)rMrNrkr��_breakzN	CHECKSTRING(#check#,"#check#","#nth# #varname#","#varshowvalue#",#varname#) {z	} /*CHECKSTRING(#check#)*/ZCHECKSTRINGZ
CHECKARRAYz2	CHECKARRAY(#check#,"#check#","#nth# #varname#") {z	} /*CHECKARRAY(#check#)*/)rkrMrNr�r�ZCHECKGENERICz4	CHECKGENERIC(#check#,"#check#","#nth# #varname#") {z	} /*CHECKGENERIC(#check#)*/)rkrMrNcCsbtd|d�i}tdd�}t�|�}tdti|�}g}g}�x|dD�]}d}	xJ|dD]>}
|
ddksztd	�q`x"|
dD]}|d|kr�|}	Pq�Wq`W|	s�td
|�qL|	g}d|	k�rxB|	d��D]2\}
}t�	|	�}|d=|
|d<||d<|�
|�q�WxT|D]L}	t|	�\}}|�rDt|	��r:|�
|�n
|�
|�t
||�}t||�}�qWqLWt�|�\}}|�r�|�
|�t
||�}t||�}t�|�\}}|�r�|�
|�t
||�}t||�}x0|D](}t�||d
|d�}t||�}�q�Wt��}i}�xJ|��D�]<}g||<�x*||D�]}
d}|
tjk�rLtj|
}n�|
tjk�rdtj|
}n�|
tjk�r|tj|
}n�|
tjk�r�tj|
}n�|
tjk�r�tj|
}n�|
tjk�r�tj|
}nt|
tjk�r�tj|
}n\|
tjk�r�tj|
}nD|
tjk�rtj|
}n,|
tjk�r$tj|
}ntdt|
���q*||�
|��q*W�qW|�
|�xF|D]>}d|k�r~|d|��s�d|k�rbt
|||�}t||�}�qbWt
t |�}t!j"�#t$d|d�}||d<t%|d�}|�&|d�'dd��|�(�td|d|f�t$d�rtt!j"�#t$d|dd�}t%|d�}|�&d�|�&d�#|d��|�(�tdt$d|df�t$d �rt!j"�#t$d|dd!�}||d"<t%|d�}|�&d#t�d$t$k�r�|�&d%�|�&d�#|d&��d$t$k�r�|�&d'�|�(�td(t$d|df�|�r"t!j"�#t$d|d)�}||d*<t%|d�}|�&d+�|�&d,t�|�&d-�g}x�d.�#|�d�)d�D]p}|�r�|d/d0k�r�x6t*|�d1k�r�|�
|dd1�d2�|d1d�}�q�W|�
|d�n|�
|d��q~Wd�#|��'d3d�}|�&|�|�(�td4|�|�r^t!j"�#t$dd5|d�}||d*<t%|d�}|�&d6�|�&d7t�|�&d8�g}x�d.�#|�d�)d�D]�}t*|�d9k�r|d/d0k�r|�
|dd9�d:�|d9d�}x6t*|�d1k�r|�
|dd1�d:�|d1d�}�q�W|�
|d�n|�
|d��q�Wd�#|��'d3d�}|�&|�|�(�td;|�|S)<z
    Return
    z	Building module "%s"...
�nameN�f2py_versionZ
interfacedrh�blockZ	interfacez1buildmodule: Expected interface block. Skipping.
zLbuildmodule: Could not found the body of interfaced routine "%s". Skipping.
�entry�argsZusergzbuildmodule: unknown need %s.
r�Z	buildpathZcoutputZcsrc�wre�	z  z&	Wrote C/API module "%s" to file "%s"
Z	dorestdoc�
modulenamezmodule.restz.. -*- rest -*-
rdr\z8	ReST Documentation is saved to file "%s/%smodule.rest"
Z
dolatexdocz
module.texZltxz6%% This file is auto-generated with f2py (version:%s)
Z
shortlatexzO\documentclass{article}
\usepackage{a4wide}
\begin{document}
\tableofcontents

r[z\end{document}z2	Documentation is saved to file "%s/%smodule.tex"
Zf2py_wrapper_output�fsrczC     -*- fortran -*-
z8C     This file is autogenerated with f2py (version:%s)
z<C     It contains Fortran 77 wrappers to fortran functions.
z

r� �Bz
     &z
     &
z'	Fortran 77 wrappers are saved to "%s"
z%s-f2pywrappers2.f90z!     -*- f90 -*-
z8!     This file is autogenerated with f2py (version:%s)
z<!     It contains Fortran 90 wrappers to fortran functions.
�Hz&
     &z'	Fortran 90 wrappers are saved to "%s"
)+rC�defmod_rulesrFZmodsign2maprr�r�items�copy�deepcopy�append�buildapir.r	rHZ
buildhooksrJrIZbuildusevarsrGZ	get_needs�keysrUrVrTrWrXrYrZrbr`�repr�module_rules�os�path�join�options�open�writerD�close�split�len)�mZum�retZ	mod_rules�vrd�rdZfuncwrappersZ
funcwrappers2�n�nbZbi�bZnb_list�k�aZnb1Zapi�wrap�arZcr�mr�uZneeds�code�c�r�fn�fZwn�lines�l�r��C/opt/alt/python37/lib64/python3.7/site-packages/numpy/f2py/rules.py�buildmodule�sD

















"


















r��stZndr��th)
r��������	rcCsnt�|�\}}t|�\}}|t_|d}t|�rJtd|d|df�ntd|d�t�|�}ti|�}x>t	D]6}d|kr�|d|�s�d|krtt
|||�}t||�}qtWd\}	}
i}�x|D�]}t�|||�}t||�r�t
}
ntt}
t||��sVt||��s0|	d}	t|	�t|	d	d
|d<n$|
d}
t|
�t|
d	d|d<nd
|d<|||<xh|
D]`}d|k�r~�qld|k�r�|d||��s�d|k�rlt
||||�}t||�}d|k�rlP�qlWq�Wx�|D]�}t||��r�t
}
nt}
||}xh|
D]`}d|k�r�qd|k�r2|d||��s<d|k�rt
||||�}t||�}d|k�rP�qWd||k�r�x8||dD](}||d<t
t|||�}t||�}�q�W�q�Wt|dt��r�|d��t|dt��r�|d��ttd|d|d|dd���|d<ttd|d|dd���}|dk�rVttdd|di��|d<ntd |d|d!��|d<|d�d"d#�|d$<|d$�d%d&�|d$<ttd'|d(|d)d*���}t|d)�dk�r�ttd+|d(|d)d*���|d,<n||d,<||d(<t|d-t��r$ttd.d-|d-i��d/|d-<g|d0<g|d1<x�d2D]�}||k�rlt||t��rl|d0|||d0<d3|}||k�r:t||t��r:|d1||d4d�d5g||dd�d6g|d1<�q:W|d7�s�|d8�r0|d9}t|t��r|�d:�n0t|t��s tt|t|�f���|d9d:7<t
t|�}t|��rVtd;|d<�ntd=|d<�||fS)>N�varsz,			Constructing wrapper function "%s.%s"...
r�r�z(		Constructing wrapper function "%s"...
r�)rrrrz	 argument�nthz keywordZhiddenr�r��checkrNrRz #docsign##docsignopt##docsignxa#rr�r�)rr�r�Zdocsignaturez#docsignopt##docsignxa#r�r�)r�r�rgz	#docsign#Zdocsignatureshortz#docsign#[#docsignopt#])rr��_z\_Zlatexdocsignatureshort�,z, z #callfortran##callfortranappend#r}r~)r}r~z##callfortran# 0,#callfortranappend#Zcallcompaqfortranr�z#docreturn#z = rurv)rqrrrsrtZlatexrz\begin{description}z\end{description}r�r�r��|z			  %s
rjz		  %s
)rKZassubrrrF�depargsr.rCZroutsign2mapr�
rout_rulesr	Zsign2mapr�	aux_rules�	arg_rulesr#r/r��stnd�check_rules�
isinstance�list�reverserErDr�r��str�AssertionError�type�
routine_rules)Zroutr�r�r��varr�r�r�r�r�ZnthkZsavevrdr�Z_rulesr�ZoptargsZcfsr�r�r�r�r�r�Bs�




&




&



,

r�)`�__doc__�
__future__rrrrrg�versionr�r��timer�Zauxfuncsr	r
rrr
rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrHrIrJrKr�Zsepdictr��asctime�	localtimer�r�r�r�Ztypedef_need_dictr�r�r�r�r�r�r�r�r�r��<module>3sN�
p�
8
	



















	8