
;>"^              a   @   sH  d  Z  d d l m Z m Z m Z d d d  Z d d l m Z e j a d d l	 Z	 d d l
 Z
 d d l Z d d l 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 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* m+ Z+ m, Z, m- Z- m. Z. m/ Z/ m0 Z0 m1 Z1 m2 Z2 m3 Z3 m4 Z4 m5 Z5 m6 Z6 m7 Z7 m8 Z8 m9 Z9 m: Z: m; Z; m< Z< m= Z= m> Z> m? Z? m@ Z@ mA ZA mB ZB mC ZC mD ZD mE ZE mF ZF mG ZG mH ZH mI ZI d d	 l mJ ZJ d d
 l mK ZK d d l mL ZL d d l mM ZM d d l mN ZN d d l mO ZO i  aP i  ZQ xc d d d d d d d d d d d d d d d d d d  d! d" d# d$ d% d& d' g D] ZR d( eQ eR <qWeS e	 jT jU d) e
 j
     ZV d* d+ e
 jW e
 jX eV   d, e d-  d. e d/  d0 e d1  d2 e d3  d4 e d5  d6 e d7  d8 e d9  d: e d;  d< e d=  d> e d?  d@ e dA  dB e dC  dD e dE  dF e dG  dH e dI  dJ dK dL d dF d  dF i d dM dN dO g d  dP dQ dR dS g i ZY dT dU d dV d" dW d! dX d' dY d# dZ d% d[ d d\ d  d\ d] e d^ eE e  d\ i i
 g ZZ dL eQ dT d_ d! d` d# da d" db dc dd de df dg dh di dj dk dl g d e dm i d dn do g d  dp dq dR g i Z[ dL dr d( ds d( d d( dt d( du d( dv dw dx d( dy d( dz d( d{ d( d| d} d~ d( d d( d d( d d( d d( i d d\ d d\ d d\ d d\ d d\ d d\ d d d d d d\ d d\ d| d\ d~ d\ dx d dy d dz d d{ d d d d d d d d d d d\ d d\ d d\ d d d d g d d d d g d d dt d ds d du d dr d d d\ d d\ d d\ d d\ d d\ d d\ d d\ d d\ d d\ d d\ d d\ d d\ d d\ d e d eE e  d\ i i/ d d d d d d\ d eE e2  i d d d d d d\ d e2 i d d d eD eE eF e2 e$   eE e   d eD eE e2  e$ eE e   d e2 d\ e d\ i d eE eF e2 e$ e   d eD eE e2  e$ eE e   d eD eE e2  e  d i di eD eE eF e2 e$   eE e   d i dr e d g i e d i e< d i e d i eE eF e e   d i e< d i e d i g d eD e: eE e;   i d d d eE eF e2 e   d e d\ i d eE eF e2 e   d e d i d eE eF e2 e   d i di eE eF e2 e   d d g i dr e d g i e d i e< d i eE eF e e   d i e d i e< d i e d i g d e! i d d d eE eF e2 e   d e d\ i d eE eF e2 e   d e d i d eE eF e2 e   d i di eE eF e2 e   d d g i dr e d g i e d i e< d i eE eF e e   d i e d i e< d i e d i g d e; i d d d eE e'  d i dz d d d e d i g dr eD e e9  d i eD e eE e9   d i g d eD e  eE e!   i d eD eE eF e2 e$   eE e   d eD eE e2  e$ eE e   d e d\ i d eD eE eF e2 e$   eE e   d eD eE e2  e$ eE e   d e d i d e d eE e  d i e d i g dr e d i e< d i e d i eE eF e e   d i e< d i e d i eD e e  d i eD e eE e   d i g d e d i di eE e  d i e d i e1 d i e/ d i g d eE e'  d i d e d eE eF e e'   d i d eD e  eE e9  eE e!   i	 d d d eE eF e2 e$   d eD eE e2  e$  d i d d d g d d dr d d d d d d d d e d i e< d i d e< d i e d i e d i d g d d d d d d di d d d g d eD e9 eE e!   i
 ds d dt d du d d e i g
 Z\ e0 d e. d e- d e> d eB d e= de@ de? d eC d eA de6 d i Z] dL eQ i d de di g d ddi e] i d ddi e di d e di d eD e5 eE e   i d d	dz d d d
d dd eD e5 eE e  e*  i d dd e di d e i d ddg di dg d e7 i d dddg di de di e dk i g d e i d eD e eE e   i d eD e eE e  e)  i di d d e" dd\ i di d d e? dd\ i di d d eC dd\ i di d d eA dd\ i di d d e dd\ i d e di di dd e8 i g Z^ dL eQ i d de di g d ddd\ di e] i dy eD e3 e)  di dx eD e4 e)  di dz e* d i d eD e3 e)  de d i g i d eD e4 e)  de d i g i d e* d eD e e'  d eD e e)  di g i dd\ i d dd dd eD e) eE e3   i d dd dd dd eD e) e3  i d d
d dd e* i d e) d i d e) d!i dy e) d"i d{ d#d d$d e) d%i d d&d'd(d)eE e%  d*i g d e) d+i d e4 d,i d e3 d,i d e) d-i d e4 d.i d e3 d.i d d/dv d0d eE e%  d1i di d2d3g d e i d eE e%  d4i e% d5i d6e d7eE e%  d8i g i d9g d d:di d;d<g d e dd\ i d dd e d=i d e$ deE e$  d>i d e* d	i d eD e5 eE e   i di e di d eD e5 eE e   i d d&d e4 d,i d e3 d,i d e4 d.i d e3 d.i d e( d?i d e( d@i di e( dAi d eD e5 eE e  e)  i	 d e dBdd\ i eD e3 eE e   dCdd\ i eE e,  dDi e, dEi g d dFdi eE e,  dGi d eD e5 eE e  e)  dd\ i d e di di e] d eD e5 eE e  e'  dd\ i d e d=i d eD e5 eE e   dd\ i d dd e$ deE e$  d>i d e dHi d e* dIi d e i d d&d e4 d,i d e3 d,i d e4 d.i d e3 d.i di e( dAi d e( dJi d e( dKi d eD e e)  i	 d e dLi eD e3 eE e   dCi dDg d dMdi dGg d eD e e)  dd\ i d e* d&i d eD e e'  i d e di d eD e e'  dd\ i d e* dNi di d g d e i d e dHi d e dd\ i d ddd&g d dd dOd e dPi d e* d	i di dg d e7 i d dQd dRdi dGdd g d e7 dd\ i d e4 d,i d e3 d,i d e4 d.i d e3 d.i d e( dSi d e( d@i di e( dAi d eD e7 e)  i d eD e7 e'  i d e dPi d e7 dd\ i d ddddTdUg d dd e* dVi di dd e i d dWd dXd dYd dZd d[d d\dy d]d eD e e+  i d d^d eD e e+  dd\ i d d_d dXd dYd dZd d`d d\dy dad eD e e&  i d d^d eD e e&  dd\ i di e di e dk i g d e dd\ i d d&d e4 d,i d e3 d,i d e4 d.i d e3 d.i d eD e e)  i d dbdce' ddi e) dei dfe e) dgi e' dhi e dii djg i g d dkeE eF e* e'   dli eD e' eE e*   dmi e dni g d e dd\ i d eD e eE e   i d eD e eE e  e)  i di d d e" dd\ i di d d e? dd\ i di d d eC dd\ i di d d eA dd\ i di d d e dd\ i d e di di dd e8 i g* Z_ d e doi di di d dpd dqdi drd eD e5 eE e   dsd\ i d dtd dudi dvd e7 dsd\ i di dwd dxd dyd e dsd\ i di dzd d{d d|i g Z` d}d~  Za d dddddddddddddddddd di
 Zb dd  Zc d S(  aG  

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declZ	frompyobjcleanupfrompyobjZtopyarrmethodZ	pyobjfromclosepyobjfromZfreememuserincludes	includes0includestypedefstypedefs_generated	cppmacrosrF   	callbackslatexdocrestdocZroutine_defsZexternroutinesZinitf2pywraphookscommonhooksZinitcommonhooksf90modhooksZinitf90modhooks
ZSOURCE_DATE_EPOCH
modulebodyz/* 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>.
 * Generation date: zv
 * Do not edit this file directly unless you know what you are doing!!!
 */

#ifdef __cplusplus
extern "C" {
#endif

zSee f2py2e/cfuncs.py: includesz
#includes#
#includes0#

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

zSee f2py2e/cfuncs.py: typedefsz
#typedefs#

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

zSee f2py2e/cfuncs.py: cppmacrosz
#cppmacros#

zSee 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#

zSee 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#

zSee 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, *tmp;
#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("$RaH  evision: $");
	PyDict_SetItemString(d, "__version__", s);
	Py_DECREF(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);
	Py_DECREF(s);
	#modulename#_error = PyErr_NewException ("#modulename#.error", NULL, NULL);
	/*
	 * Store the error object inside the dict, so that it could get deallocated.
	 * (in practice, this is a module, so it likely will not and cannot.)
	 */
	PyDict_SetItemString(d, "_#modulename#_error", #modulename#_error);
	Py_DECREF(#modulename#_error);
	for(i=0;f2py_routine_defs[i].name!=NULL;i++) {
		tmp = PyFortranObject_NewAsAttr(&f2py_routine_defs[i]);
		PyDict_SetItemString(d, f2py_routine_defs[i].name, tmp);
		Py_DECREF(tmp);
	}
#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
Zseparatorsforz*\section{Module \texttt{#texmodulename#}}
z
#modnote#
z
#latexdoc#zModule #modulename#
=P   z

#restdoc#bodyz/*eof body*/z/*eof method*/z/*eof externroutines*/z/*eof routine_defs*/z/*eof initf90modhooks*/z/*eof initf2pywraphooks*/z/*eof initcommonhooks*/ Zmodnotez#note#a  
#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#docz!#docreturn##name#(#docsignature#)docshortz&#docreturn##name#(#docsignatureshort#)Zdocsz'"	#docreturn##name#(#docsignature#)\n"
Zneedzarrayobject.hZ
CFUNCSMESSZMINMAXz#define DEBUGCFUNCSz1\subsection{Wrapper function \texttt{#texname#}}
zk
\noindent{{}\verb@#docreturn##name#@{}}\texttt{(#latexdocsignatureshort#)}
#routnote#

#latexdocstrsigns#
zWrapped function ``#name#``
-ZcallfortranroutineZroutdebugenterZroutdebugleaveZroutdebugfailureZ	setjmpbufz || 	docstrreq	docstropt	docstrout	docstrcbsdocstrsignsz\n"
"latexdocstrsignsZlatexdocstrreqZlatexdocstroptZlatexdocstroutZlatexdocstrcbskwlistZ	kwlistoptcallfortrancallfortranappenddocsign
docsignoptz/*decl*/z/*freemem*/Zdocsignshortdocsignoptshortz\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	args_capiZ	keys_capiZfunctypez/*frompyobj*/z/*end of cleanupfrompyobj*/z/*pyobjfrom*/z/*end of closepyobjfrom*/z/*topyarr*/z/*routdebugleave*/z/*routdebugenter*/z/*routdebugfailure*/z/*callfortranroutine*/	argformat	keyformatZneed_cfuncs	docreturnreturnZreturnformatZrformatZkwlistxaZkeys_xaxaformat	docsignxadocsignxashortZinitf2pywraphookZroutnotez
--- #note#Zapinamezf2py_rout_#modulename#_#name#Zpynamez#modulename#.#name#_checkz-f2py_rout_#modulename#_#f90modulename#_#name#z##modulename#.#f90modulename#.#name#voidZdeclfortranroutinezGextern void #F_FUNC#(#fortranname#,#FORTRANNAME#)(#callprotoargument#);z/extern void #fortranname#(#callprotoargument#);Zroutine_defzn	{"#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#},ZF_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		}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#");
      tmp = F2PyCapsule_FromVoidPtr((void*)#F_FUNC#(#name_lower#,#NAME#),NULL);
      PyObject_SetAttrString(o,"_cpointer", tmp);
      Py_DECREF(tmp);
#if PY_VERSION_HEX >= 0x03000000
      s = PyUnicode_FromString("#name#");
#else
      s = PyString_FromString("#name#");
#endif
      PyObject_SetAttrString(o,"__name__", s);
      Py_DECREF(s);
    }
    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	}a  
    {
      extern void #F_FUNC#(#name_lower#,#NAME#)(void);
      PyObject* o = PyDict_GetItemString(d,"#name#");
      tmp = F2PyCapsule_FromVoidPtr((void*)#F_FUNC#(#name_lower#,#NAME#),NULL);
      PyObject_SetAttrString(o,"_cpointer", tmp);
      Py_DECREF(tmp);
#if PY_VERSION_HEX >= 0x03000000
      s = PyUnicode_FromString("#name#");
#else
      s = PyString_FromString("#name#");
#endif
      PyObject_SetAttrString(o,"__name__", s);
      Py_DECREF(s);
    }
    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");
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);zpyobj_from_#ctype#1Z	long_longZlong_doublez	#rformat#z,#name#_return_value_capiz,#name#_return_valuez$	#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
STRINGFREEzZ	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");Zcomplex_long_doubleZunsigned_charZunsigned_shortZunsignedZunsigned_long_longz.	/* Processing auxiliary variable #varname# */z$	fprintf(stderr,"#vardebuginfo#\n");z)	/* End of cleaning variable #varname# */z	#ctype# #varname# = 0;zmath.hz	#varname# = #init#;z
,#varname#z#outvarname#,z#varrformat#z	#ctype# #varname#;z0	#varname#.r = #init.r#, #varname#.i = #init.i#;z	#ctype# #varname# = NULL;z	int slen(#varname#);zlen..z	#ctype# *#varname# = NULL;z1	npy_intp #varname#_Dims[#rank#] = {#rank*[-1]#};z#	const int #varname#_Rank = #rank#;Zforcomb_dependzflen(#varname#),stringz$	/* Processing variable #varname# */z#pydocsign#z\item[]{{}\verb@#pydocsign#@{}}z--- See above.Zdependz"#varname#",z
#varname#,z#varname#=#showinit#,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",OzO!z,&#varname#_capiz!,&PyTuple_Type,&#varname#_xa_capiz(setjmp(#cbname#_jmpbuf))z#varname#_cptr,z#cbname#zsetjmp.hzif(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);
          Py_DECREF(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));
	}ZSWAPZcreate_cb_arglistz3	fprintf(stderr,"#vardebugshowvalue#\n",#varname#);z&#varname#,zW	f2py_success = try_pyarr_from_#ctype#(#varname#_capi,&#varname#);
	if (f2py_success) {z/	} /*if (f2py_success) of #varname# pyobjfrom*/ztry_pyarr_from_#ctype#z8	if (#varname#_capi == Py_None) #varname# = #init#; elsez	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_pyobjzA	fprintf(stderr,"#vardebugshowvalue#\n",#varname#.r,#varname#.i);z,#varname#_capizY		f2py_success = try_pyarr_from_#ctype#(#varname#_capi,&#varname#);
		if (f2py_success) {z0		} /*if (f2py_success) of #varname# pyobjfrom*/zT	if (#varname#_capi==Py_None) {#varname#.r = #init.r#, #varname#.i = #init.i#;} elsez0	}  /*if (f2py_success) of #varname# frompyobj*/z1	#varname#_capi = pyobj_from_#ctype#1(#varname#);zslen(#varname#),zC	fprintf(stderr,"#vardebugshowvalue#\n",slen(#varname#),#varname#);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) {z*	PyArrayObject *capi_#varname#_tmp = NULL;z	int capi_#varname#_intent = 0;z,capi_#varname#_tmpz"	int capi_overwrite_#varname# = 1;z"overwrite_#varname#",iz,&capi_overwrite_#varname#zoverwrite_#varname#=1,zoverwrite_#varname#,z9overwrite_#varname# : input int, optional\n    Default: 1zH	capi_#varname#_intent |= (capi_overwrite_#varname#?0:F2PY_INTENT_COPY);z"	int capi_overwrite_#varname# = 0;zoverwrite_#varname#=0,z9overwrite_#varname# : input int, optional\n    Default: 0z	#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*/z3	fprintf(stderr,"debug-capi:Checking `#check#'\n");zN	CHECKSCALAR(#check#,"#check#","#nth# #varname#","#varshowvalue#",#varname#) {z	} /*CHECKSCALAR(#check#)*/ZCHECKSCALAR_breakzN	CHECKSTRING(#check#,"#check#","#nth# #varname#","#varshowvalue#",#varname#) {z	} /*CHECKSTRING(#check#)*/ZCHECKSTRINGZ
CHECKARRAYz2	CHECKARRAY(#check#,"#check#","#nth# #varname#") {z	} /*CHECKARRAY(#check#)*/ZCHECKGENERICz4	CHECKGENERIC(#check#,"#check#","#nth# #varname#") {z	} /*CHECKGENERIC(#check#)*/c          (   C   sY	  t  d |  d  i  } t d d  } t j |   } t d t i |  } g  } g  } xj|  d D]^} d }	 x[ |  d D]O }
 |
 d d k s t d	  qz x) |
 d D] } | d | k r | }	 Pq Wqz W|	 s t d
 |  qc |	 g } d |	 k rQxU |	 d j   D]C \ } } t j	 |	  } | d =| | d <| | d <| j
 |  q
Wxm | D]e }	 t |	  \ } } | rt |	  r| j
 |  n | j
 |  t | |  } t | |  } qXWqc Wt j |   \ } } | r| j
 |  t | |  } t | |  } t j |   \ } } | r3| j
 |  t | |  } t | |  } x; | D]3 } t j | |  d | d  } t | |  } qXWt j   } i  } x| j   D]} g  | | <xv| | D]j} d } | t j k rt j | } n.| t j k rt j | } n| t j k r2t j | } n | t j k rQt j | } n | t j k rpt j | } n | t j k rt j | } n | t j k rt j | } nt | t j k rt j | } nU | t j k rt j | } n6 | t j k rt j | } n t d t |   q| | j
 |  qWqW| j
 |  xW | D]O } d | k rq| d |   s}d | k rOt | | |   } t | |  } qOWt t  |  } t! j" j# t$ d | d  } | | d <t% | d  $ } | j& | d j' d d<   Wd QRXt  d |  d | f  t$ d rt! j" j# t$ d | d d  } t% | d  . } | j& d  | j& d j# | d   Wd QRXt  d  t$ d | d f  t$ d! rtt! j" j# t$ d | d d"  } | | d# <t% | d  d } | j& d$ t  d% t$ k r8| j& d&  | j& d j# | d'   d% t$ k rQ| j& d(  Wd QRXt  d) t$ d | d f  | rt! j" j# t$ d | d*  } | | d+ <t% | d  } | j& d,  | j& d- t  | j& d.  g  } x d/ j# |  d j( d  D] } | ru| d0 d k ruxA t) |  d1 k r`| j
 | d d1  d2  | d1 d  } q W| j
 | d  q| j
 | d  qWd j# |  j' d3 d  } | j& |  Wd QRXt  d4 |  | rU	t! j" j# t$ d d5 | d  } | | d+ <t% | d  =} | j& d6  | j& d7 t  | j& d8  g  } x d/ j# |  d j( d  D] } t) |  d9 k r	| d0 d k r	| j
 | d d9  d:  | d9 d  } xA t) |  d1 k r| j
 | d d1  d:  | d1 d  } qW| j
 | d  qX| j
 | d  qXWd j# |  j' d3 d  } | j& |  Wd QRXt  d; |  | S)=z
    Return
    z	Building module "%s"...
nameNf2py_versionZ
interfacedr^   blockZ	interfacez1buildmodule: Expected interface block. Skipping.
zLbuildmodule: Could not found the body of interfaced routine "%s". Skipping.
entryargsZuser_   zbuildmodule: unknown need %s.
rv   Z	buildpathZcoutputZcsrcwr[   	    z&	Wrote C/API module "%s" to file "%s"
Z	dorestdoc
modulenamezmodule.restz.. -*- rest -*-
rZ   rW   z8	ReST Documentation is saved to file "%s/%smodule.rest"
Z
dolatexdocz
module.texZltxz6%% This file is auto-generated with f2py (version:%s)
Z
shortlatexzO\documentclass{article}
\usepackage{a4wide}
\begin{document}
\tableofcontents

rV   z\end{document}z2	Documentation is saved to file "%s/%smodule.tex"
Zf2py_wrapper_outputfsrczC     -*- fortran -*-
z8C     This file is autogenerated with f2py (version:%s)
z<C     It contains Fortran 77 wrappers to fortran functions.
z

r   B   z
     &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.
H   z&
     &z'	Fortran 90 wrappers are saved to "%s"
z  )*rB   defmod_rulesrE   Zmodsign2mapr
   r~   r   itemscopydeepcopyappendbuildapir-   r   rG   Z
buildhooksrI   rH   ZbuildusevarsrF   Z	get_needskeysrP   rQ   rO   rR   rS   rT   rU   rY   rX   reprmodule_rulesospathjoinoptionsopenwriterC   splitlen)mZumretZ	mod_rulesvrdrdZfuncwrappersZfuncwrappers2nnbZbibZnb_listkaZnb1ZapiwraparZcrmruZneedscodecrfnfZwnlinesl r   B/home/birch/.local/lib/python3.5/site-packages/numpy/f2py/rules.pybuildmodule  s:   
		


(
$
	!
	

#	
#"r   str   Znd   r      th            	   c          
   C   s  t  j |   \ }  } t |   \ } } | t _ |  d } t |   re t d |  d |  d f  n t d |  d  t j |   } t i  |  } xW t	 D]O } d | k r | d |   s d | k r t
 | | |   } t | |  } q Wd< \ }	 }
 i  } xO| D]G} t j | | |  } t | |  r=t } n t } t | |  st | |  s|	 d }	 t |	  t |	 d	 d
 | d <q|
 d }
 t |
  t |
 d	 d | d <n
 d | d <| | | <x{ | D]s } d | k rqd | k r| d | |  sd | k rt
 | | | |  } t | |  } d | k rPqWqWx| D]} t | |  ryt } n t } | | } x{ | D]s } d | k rqd | k r| d | |  sd | k rt
 | | | |  } t | |  } d | k rPqWd | | k rZxE | | d D]5 } | | d <t
 t | | |  } t | |  } q&WqZWt | d t  r| d j   t | d t  r| d j   t t d d | d d | d d | d i   | d <t t d d | d d | d i   } | d k r7t t d d | d i   | d <n# t d d | d d | i  | d <| d j d d   | d! <| d! j d" d#  | d! <t t d$ d% | d% d& | d& i   } t | d&  d k rt t d' d% | d% d& | d& i   | d( <n
 | | d( <| | d% <t | d) t  rKt t d* d) | d) i   d+ | d) <g  | d, <g  | d- <x d. d/ d0 d1 g D] } | | k rt | | t  r| d, | | | d, <d2 | } | | k rrt | | t  rr| d- | | d d  d3 g | | d d   d4 g | d- <qrW| d5 s.| d6 r| d7 } t | t  rW| j d8  n; t | t  st t | t |  f    | d7 d8 7<t
 t |  } t |   rt d9 | d:  n t d; | d:  | | f S)=Nvarsz,			Constructing wrapper function "%s.%s"...
r   r}   z(		Constructing wrapper function "%s"...
rv   r   r   r   z	 argumentnthz keywordZhiddenrx   r|   checkrL   rN   z #docsign##docsignopt##docsignxa#rl   rm   rt   Zdocsignaturez#docsignopt##docsignxa#ru   rn   r_   z	#docsign#Zdocsignatureshortz#docsign#[#docsignopt#]_z\_Zlatexdocsignatureshort,z, z #callfortran##callfortranappend#rj   rk   z##callfortran# 0,#callfortranappend#Zcallcompaqfortranrq   z#docreturn#z = rg   rh   rc   rd   re   rf   Zlatexz\begin{description}z\end{description}rp   rs   ro   |z			  %s
ra   z		  %s
)r   r   )rJ   Zassubrr   rE   depargsr-   rB   Zroutsign2mapr
   
rout_rulesr   Zsign2mapr   	aux_rules	arg_rulesr"   r.   r   stndcheck_rules
isinstancelistreverserD   rC   r   r   strAssertionErrortyperoutine_rules)Zroutr   r   r   varr   r   r   r   r   ZnthkZsavevrdr   Z_rulesr   ZoptargsZcfsr   ro   r   r   r   r   P  s    	
(	
#
#

,		
,
	

	
#
	 	'

$


2
r   )d__doc__
__future__r   r   r   r   r_   versionr~   r   timer   Zauxfuncsr   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   r   Zsepdictr   intenvirongetZgenerationtimeasctimegmtimer   r   r   r   Ztypedef_need_dictr   r   r   r   r   r   r   r   r   r   <module>4   s  	 y	!h%		!7				'	*					!						!					'	'									!																																																											$