o 6a@sdZddlZddlZddlZddlmZejZejZddl m Z m Z m Z 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;mZ>m?Z?m@Z@mAZAmBZBmCZCmDZDmEZEmFZFmGZGddlmHZHddlmIZIddlmJZJdd lmKZKdd lmLZLdd lmMZMiZNiZOd D]ZPd eOeP<qeQejRSdeZTdeUeVeTdeddeddeddeddeddeddeddedd ed!d"ed#d$ed%d&ed'd(ed)d*ed+d,ed-d.ed/d*d*d0gd1d2d3gd4ZWd5d6d7d8d9d:d;d gZXeOd?d@dAdBdCdDdEgdFe dGidHdIgdJgdK ZYidLidMd dNd dOd dPd dQd dRdSdTd dUd dVd dWd dXdYdZd d[d d\d d]d d^d d_d<d`d<dad<dbd<dcd<ddd<dOdedfdgdhd<did<dXd<dZd<dTdjdUdkdVdldWdmid[dnd\dod]dpd^dqdrd<dsd<dtd<dudvdwdxgdydzd{d|gd}d~dPddNddQddMddd<dde3di Z[dLeOide digde[dޜdediedieAe2eBedddddeAe2eBee'ddediedddgdge4dgddediedigeddeAeeBeideAeeBee&idedd ed?ieAe0eBed2id3gd@d6geAee&d<d%e'd*ieAee$dAedieAee$d<d8e'dBidgedCe d9ied<d8gdDddEe dFie'didge4dGdHdIgdJe4d<d%e1die0die1d+ie0d+ie%dKie%d-ie%d.ieAe4e&dLdeAe4e$ie dFie4d<d8gdMde'dNidedOdPdQdRdSdTdUdVeAee(dWdXeAee(d<d8dYdQdRdSdZdUd[eAee#dWdXeAee#d<d8ediedigedd 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 N) __version__)> applyrules debugcapi dictappenderrmessgentitlegetargs2hascallstatement hasexternals hasinitvaluehasnote hasresultnoteisarrayisarrayofstrings iscomplexiscomplexarrayiscomplexfunctioniscomplexfunction_warnisdummyroutine isexternal isfunctionisfunction_wrap isint1array isintent_aux isintent_cisintent_callback isintent_copy isintent_hideisintent_inoutisintent_nothide isintent_outisintent_overwrite islogicalislong_complex islong_doubleislong_doublefunction islong_longislong_longfunctionismoduleroutine isoptional isrequiredisscalarissigned_long_longarrayisstring isstringarrayisstringfunction issubroutineissubroutine_wrap isthreadsafe isunsignedisunsigned_charisunsigned_chararrayisunsigned_long_longisunsigned_long_longarrayisunsigned_shortisunsigned_shortarrayl_andl_notl_oroutmessreplace stripcommarequiresf90wrapper) capi_maps)cfuncs) common_rules) use_rules) f90mod_rules) func2subr)decl frompyobjcleanupfrompyobjtopyarrmethod pyobjfromclosepyobjfromfreemem userincludes includes0includestypedefstypedefs_generated cppmacrosrC callbackslatexdocrestdoc routine_defsexternroutinesinitf2pywraphooks commonhooksinitcommonhooks f90modhooksinitf90modhooks SOURCE_DATE_EPOCHz/* 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 . * Generation date: zv * 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&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} }; static struct PyModuleDef moduledef = { PyModuleDef_HEAD_INIT, "#modulename#", NULL, -1, f2py_module_methods, NULL, NULL, NULL, NULL }; PyMODINIT_FUNC PyInit_#modulename#(void) { int i; PyObject *m,*d, *s, *tmp; m = #modulename#_module = PyModule_Create(&moduledef); Py_SET_TYPE(&PyFortran_Type, &PyType_Type); import_array(); if (PyErr_Occurred()) {PyErr_SetString(PyExc_ImportError, "can't initialize module #modulename# (failed to import numpy)"); return m;} d = PyModule_GetDict(m); s = PyUnicode_FromString("#f2py_version#"); PyDict_SetItemString(d, "__version__", s); Py_DECREF(s); s = PyUnicode_FromString( "This module '#modulename#' is auto-generated with f2py (version:#f2py_version#).\nFunctions:\n" #docs#"."); PyDict_SetItemString(d, "__doc__", s); Py_DECREF(s); s = PyUnicode_FromString("a;"); PyDict_SetItemString(d, "__f2py_numpy_version__", 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 m; } #ifdef __cplusplus } #endif )rWrX)z*\section{Module \texttt{#texmodulename#}} z #modnote# z #latexdoc#zdModule #modulename# ================================================================================z #restdoc#) modulebody separatorsforrWrXz /*eof body*/z/*eof method*/z/*eof externroutines*/z/*eof routine_defs*/z/*eof initf90modhooks*/z/*eof initf2pywraphooks*/z/*eof initcommonhooks*/z#note#) bodyrLrZrYr_r[r]rWrXmodnotea= #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.h CFUNCSMESSMINMAXz#define DEBUGCFUNCSz1\subsection{Wrapper function \texttt{#texname#}} zk \noindent{{}\verb@#docreturn##name#@{}}\texttt{(#latexdocsignatureshort#)} #routnote# #latexdocstrsigns# zlWrapped function ``#name#`` --------------------------------------------------------------------------------) rdrfrYr[rZdocdocshortdocsneedrUrWrXrdcallfortranroutineroutdebugenterrHroutdebugleaveroutdebugfailure setjmpbufz || docstrreq docstropt docstrout docstrcbs docstrsignsz\n" "latexdocstrsignslatexdocstrreqlatexdocstroptlatexdocstroutlatexdocstrcbskwlist kwlistopt callfortrancallfortranappenddocsign docsignoptz/*decl*/rOz /*freemem*/ docsignshortdocsignoptshortz\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: args_capi keys_capifunctyperIz /*frompyobj*/rJz/*end of cleanupfrompyobj*/rMz /*pyobjfrom*/rNz/*end of closepyobjfrom*/rKz /*topyarr*/z/*routdebugleave*/z/*routdebugenter*/z/*routdebugfailure*/z/*callfortranroutine*/ argformatz --- #note#) keyformat need_cfuncs docreturnreturn returnformatrformatkwlistxakeys_xaxaformat docsignxadocsignxashortinitf2pywraphookroutnotezf2py_rout_#modulename#_#name#z#modulename#.#name#)apinamepynamerH_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#},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 })rdeclfortranroutine routine_defrmrnrzFextern 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); s = PyUnicode_FromString("#name#"); PyObject_SetAttrString(o,"__name__", s); Py_DECREF(s); } 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 })rrrrrmrnra { 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); s = PyUnicode_FromString("#name#"); PyObject_SetAttrString(o,"__name__", s); Py_DECREF(s); } #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"); )rrrur{rnrzJextern #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#1 long_long long_doublez #rformat#z,#name#_return_value_capiz,#name#_return_value) rrrHrnrMrmrrrz$ #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);)rr STRINGFREE) rrrHrrnrrrOrmrzZ 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");)rorprqrcomplex_long_double unsigned_charunsigned_shortunsignedunsigned_long_longz. /* Processing auxiliary variable #varname# */z$ fprintf(stderr,"#vardebuginfo#\n");z) /* End of cleaning variable #varname# */)rIrJrmz #ctype# #varname# = 0;zmath.hz #varname# = #init#;)rHrmrIrz ,#varname#z #outvarname#,z #varrformat#)rrurrrz #ctype# #varname#;z0 #varname#.r = #init.r#, #varname#.i = #init.i#;)rHrIr #ctype# #varname# = NULL; int slen(#varname#);len..)rHrmr) #ctype# *#varname# = NULL;1 npy_intp #varname#_Dims[#rank#] = {#rank*[-1]#};# const int #varname#_Rank = #rank#;forcombrhr)rmr_dependzflen(#varname#),string)rrmrz$ /* Processing variable #varname# */)rIrJrrmz #pydocsign#z\item[]{{}\verb@#pydocsign#@{}}z--- See above.)rtrsrurzryr{dependz "#varname#",z #varname#,)r}rrz#varname#=#showinit#,)r~rrr)rrrrz#varname#_extra_args=(),rz#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#@{}}.z3 #cbname#_t #varname#_cb = { Py_None, NULL, 0 };z1 #cbname#_t *#varname#_cb_ptr = &#varname#_cb;z, PyTupleObject *#varname#_xa_capi = NULL;z$ #cbname#_typedef #varname#_cptr;rz"#varname#_extra_args",OrrzO!z,&#varname#_cb.capirz!,&PyTuple_Type,&#varname#_xa_capiz(setjmp(#varname#_cb.jmpbuf))z#varname#_cptr,rmz#cbname#zsetjmp.hzif(F2PyCapsule_Check(#varname#_cb.capi)) { #varname#_cptr = F2PyCapsule_AsVoidPtr(#varname#_cb.capi); } else { #varname#_cptr = #cbname#; } aif (#varname#_cb.capi==Py_None) { #varname#_cb.capi = PyObject_GetAttrString(#modulename#_module,"#varname#"); if (#varname#_cb.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#_cb.capi==NULL) { PyErr_SetString(#modulename#_error,"Callback #varname# not defined (as an argument or module #modulename# attribute).\n"); return NULL; } } z if (create_cb_arglist(#varname#_cb.capi,#varname#_xa_capi,#maxnofargs#,#nofoptargs#,&#varname#_cb.nofargs,&#varname#_cb.args_capi,"failed in processing argument list for call-back #varname#.")) { z fprintf(stderr,"debug-capi:Assuming %d arguments; at most #maxnofargs#(-#nofoptargs#) is expected.\n",#varname#_cb.nofargs); CFUNCSMESSPY("for #varname#=",#varname#_cb.capi);zK fprintf(stderr,"#vardebugshowvalue# (call-back in C).\n",#cbname#);z CFUNCSMESS("Saving callback variables for `#varname#`.\n"); #varname#_cb_ptr = swap_active_#cbname#(#varname#_cb_ptr);z CFUNCSMESS("Restoring callback variables for `#varname#`.\n"); #varname#_cb_ptr = swap_active_#cbname#(#varname#_cb_ptr); Py_DECREF(#varname#_cb.args_capi); }SWAPcreate_cb_arglist)rIrJrmrrz3 fprintf(stderr,"#vardebugshowvalue#\n",#varname#);z &#varname#,)rHrMrrr)rmr$ PyObject *#varname#_capi = Py_None;z,&#varname#_capizW f2py_success = try_pyarr_from_#ctype#(#varname#_capi,&#varname#); if (f2py_success) {z/ } /*if (f2py_success) of #varname# pyobjfrom*/ztry_pyarr_from_#ctype#) rHrrrrrMrNrmrz8 if (#varname#_capi == Py_None) #varname# = #init#; elserz 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#*/#ctype#_from_pyobj)rIrmrr)rIrrzA fprintf(stderr,"#vardebugshowvalue#\n",#varname#.r,#varname#.i);z,#varname#_capi)rHrrMrrzY f2py_success = try_pyarr_from_#ctype#(#varname#_capi,&#varname#); if (f2py_success) {z0 } /*if (f2py_success) of #varname# pyobjfrom*/) rHrrrrrmrMrNrzT if (#varname#_capi==Py_None) {#varname#.r = #init.r#, #varname#.i = #init.i#;} elsez0 } /*if (f2py_success) of #varname# frompyobj*/)rHrz1 #varname#_capi = pyobj_from_#ctype#1(#varname#);)rMrmr)rrrzslen(#varname#),zC fprintf(stderr,"#vardebugshowvalue#\n",slen(#varname#),#varname#);)rHrrrMrrmrz 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#*/)rrrzV f2py_success = try_pyarr_from_#ctype#(#varname#_capi,#varname#); if (f2py_success) {)rrrrrMrNrmr)rrrz* PyArrayObject *capi_#varname#_tmp = NULL;z int capi_#varname#_intent = 0;z,capi_#varname#_tmp)rHrrrmrz" 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)rHrrrrrrtrzH 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)rHrrrrrz #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);aR if (capi_#varname#_tmp == NULL) { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : #modulename#_error,"failed in converting #nth# `#varname#' of #pyname# to C/Fortran array" ); npy_PyErr_ChainExceptionsCause(exc, val, tb); } 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 { PyObject *exc, *val, *tb; PyErr_Fetch(&exc, &val, &tb); PyErr_SetString(exc ? exc : #modulename#_error,"Initialization of #nth# #varname# failed (initforcomb)."); npy_PyErr_ChainExceptionsCause(exc, val, tb); 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*/)rIrJrrz3 fprintf(stderr,"debug-capi:Checking `#check#'\n");)rIrmzN CHECKSCALAR(#check#,"#check#","#nth# #varname#","#varshowvalue#",#varname#) {z } /*CHECKSCALAR(#check#)*/ CHECKSCALAR)rIrJrmr_breakzN CHECKSTRING(#check#,"#check#","#nth# #varname#","#varshowvalue#",#varname#) {z } /*CHECKSTRING(#check#)*/ CHECKSTRING CHECKARRAYz2 CHECKARRAY(#check#,"#check#","#nth# #varname#") {z } /*CHECKARRAY(#check#)*/)rmrIrJrr CHECKGENERICz4 CHECKGENERIC(#check#,"#check#","#nth# #varname#") {z } /*CHECKGENERIC(#check#)*/)rmrIrJc Cstd|di}tdd}t|}tdti|}g}g}|dD]}d} |dD]} | ddvr9td q,| dD] } | d|krI| } nq=q,| sTtd |q$| g} d | vr{| d D]\} }t | }|d =| |d<||d <| |qa| D]%} t | }t | \}}|r|r| |n| |t ||}t||}q}q$t|\}}|r| |t ||}t||}t|\}}|r| |t ||}t||}|D]}t||d |d}t||}qt}i}|D]}g||<||D]} d}| tjvrtj| }nu| tjvrtj| }ni| tjvr&tj| }n]| tjvr2tj| }nQ| tjvr>tj| }nE| tjvrJtj| }n9| tjvrVtj| }n-| tjvrbtj| }n!| tjvrntj| }n| tjvrztj| }n tdt| q|| |qq| ||D]}d|vr|d|sd|vrt |||}t||}qt t |}t!j"#t$d|d}||d<t%|d}|&|d'ddWdn 1swYtd|d|ft$dr5t!j"#t$d|dd}t%|d}|&d|&d#|dWdn 1s$wYtdt$d|dft$d rt!j"#t$d|dd!}||d"<t%|d-}|&d#td$t$vrl|&d%|&d#|d&d$t$vrv|&d'Wdn 1swYtd(t$d|df|rBt!j"#t$d|d)}||d*<t%|d}|&d+|&d,t|&d-g}d.#|d(dD]V}d/|)d0krd1krnn | |dq|r|d/d2krt*|d1kr | |dd1d3|d1d}t*|d1ks| |dq| |dqd#|'d4d}|&|Wdn 1s7wYtd5||r t!j"#t$dd6|d}||d*<t%|d}|&d7|&d8t|&d9g}d.#|d(dD]k}d/|)d0krd:krnn | |dqyt*|d:kr|d/d2kr| |dd:d;|d:d}t*|d1kr| |dd1d;|d1d}t*|d1ks| |dqy| |dqyd#|'d4d}|&|Wdn 1swYtd<||S)=z Return z Building module "%s"... nameN f2py_version interfacedrfblock) interfacezabstract interfacez1buildmodule: Expected interface block. Skipping. zLbuildmodule: Could not found the body of interfaced routine "%s". Skipping. entryargsuserezbuildmodule: unknown need %s. r buildpathcoutputcsrcwrc z z& Wrote C/API module "%s" to file "%s" dorestdoc modulenamez module.restz.. -*- rest -*- r`rXz8 ReST Documentation is saved to file "%s/%smodule.rest" dolatexdocz module.texltxz6%% This file is auto-generated with f2py (version:%s) shortlatexzO\documentclass{article} \usepackage{a4wide} \begin{document} \tableofcontents rWz\end{document}z2 Documentation is saved to file "%s/%smodule.tex" f2py_wrapper_outputfsrczC -*- fortran -*- z8C This file is autogenerated with f2py (version:%s) z defmod_rulesrB modsign2maprrritemscopydeepcopyappendrAbuildapirrD buildhooksrFrE buildusevarsrC get_needskeysrQrRrPrSrTrUrVr^r\repr module_rulesospathjoinoptionsopenwriter?splitfindlen) mumret mod_rulesvrdrd funcwrappers funcwrappers2nnbbibnb_listkanb1isf90apiwraparcrmruneedscodecrfnfwnlineslr 2/usr/lib/python3/dist-packages/numpy/f2py/rules.py buildmodulesv                                            "               "     "    r stndrth) r rcCst|\}}t|\}}|t_|d}t|r%td|d|dfntd|dt|}ti|}t D]}d|vrE|d|sId|vrTt |||}t||}q9d\} } i} |D]|} t | || }t || rpt } n8t} t|| st|| s| d} t| t| d d |d <n| d} t| t| d d |d <nd |d <|| | <| D]*}d|vrqd|vr|d|| sd|vrt |||| }t||}d|vrnqq]|D]d} t || rt } nt} | | }| D].}d|vrqd|vr|d|| s d|vrt |||| }t||}d|vrnqd|| vr@|| dD]}||d<t t||| }t||}q+qt|dtrO|dt|dtr]|dttd|d|d|dd|d<ttd|d|dd}|dkrttdd|di|d<n td |d|d!|d<|dd"d#|d$<|d$d%d&|d$<ttd'|d(|d)d*}t|d)dkrttd+|d(|d)d*|d,<n||d,<||d(<t|d-trttd.d-|d-id/|d-<g|d0<g|d1<d2D]G}||vrt||tr|d0|||d0<d3|}||vrHt||trH|d1||d4dd5g||ddd6g|d1<qt t|}t|r`td7|d8||fStd9|d8||fS):Nvarsz, Constructing wrapper function "%s.%s"... rrz( Constructing wrapper function "%s"... r)rrr z argumentnthz keywordhiddenrrcheckrJrNz #docsign##docsignopt##docsignxa#rrr)rrr docsignaturez#docsignopt##docsignxa#rr)rrrez #docsign#docsignatureshortz#docsign#[#docsignopt#])rr_z\_latexdocsignatureshort,z, z #callfortran##callfortranappend#rr)rrz##callfortran# 0,#callfortranappend#callcompaqfortranrz #docreturn#z = rwrx)rsrtrurvlatexrz\begin{description}z\end{description}z %s rkz %s )rGassubrr rBdepargsr)r> routsign2mapr rout_rulesrsign2mapr aux_rules arg_rulesrr*rstnd check_rules isinstancelistreverser@r?r routine_rules)routrrr%varrrrrrnthksavevrdr_rulesroptargscfsrr r r r>s           &            r)b__doc__rtimerrerversionr numpy_versionauxfuncsrrrrrr r r r r rrrrrrrrrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8r9r:r;r<r=r>r?r@rArBrCrDrErFrGrsepdictrintenvirongetgenerationtimeasctimegmtimerrr0r'typedef_need_dictr)r*r,r r+rr r r r s3          !!$$**--00336688;;cc 8Q           !"" (    '  '      (   +     V       ',           F - ~  $  5: @FR \_cgmw !*/8<@G %  y{~ #  ";